code: function addPrefs(profile, options) {
    var userPrefs = options.prefs || {};
  
    return when.promise(function(resolve, reject) {
      Object.keys(userPrefs).forEach(function(key) {
        profile.setPreference(key, userPrefs[key]);
      });
      profile.updatePreferences();
      resolve(profile);
    });
  }
docs: Set any of the preferences passed via options.