Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Unified Diff: chrome/browser/profiles/profile.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile.cc
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index f83b7f24fb3623e2da4ba0b7bcb024d455a2854e..a2c0d6fbf4b3bd36aa8a1fa808b3adb2f411bcf9 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -96,37 +96,68 @@ const ProfileId Profile::kInvalidProfileId = static_cast<ProfileId>(0);
// static
void Profile::RegisterUserPrefs(PrefService* prefs) {
- prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled, true);
- prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly, true);
- prefs->RegisterBooleanPref(prefs::kSafeBrowsingEnabled, true);
- prefs->RegisterBooleanPref(prefs::kSafeBrowsingReportingEnabled, false);
+ prefs->RegisterBooleanPref(prefs::kSearchSuggestEnabled,
+ true,
+ PrefService::SYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kSessionExitedCleanly,
+ true,
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kSafeBrowsingEnabled,
+ true,
+ PrefService::SYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kSafeBrowsingReportingEnabled,
+ false,
+ PrefService::UNSYNCABLE_PREF);
// TODO(estade): IDS_SPELLCHECK_DICTIONARY should be an ASCII string.
prefs->RegisterLocalizedStringPref(prefs::kSpellCheckDictionary,
- IDS_SPELLCHECK_DICTIONARY);
- prefs->RegisterBooleanPref(prefs::kEnableSpellCheck, true);
- prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, true);
+ IDS_SPELLCHECK_DICTIONARY,
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kEnableSpellCheck,
+ true,
+ PrefService::SYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect,
+ true,
+ PrefService::UNSYNCABLE_PREF);
#if defined(TOOLKIT_USES_GTK)
prefs->RegisterBooleanPref(prefs::kUsesSystemTheme,
- GtkThemeService::DefaultUsesSystemTheme());
+ GtkThemeService::DefaultUsesSystemTheme(),
+ PrefService::UNSYNCABLE_PREF);
#endif
- prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename, FilePath());
+ prefs->RegisterFilePathPref(prefs::kCurrentThemePackFilename,
+ FilePath(),
+ PrefService::UNSYNCABLE_PREF);
prefs->RegisterStringPref(prefs::kCurrentThemeID,
- ThemeService::kDefaultThemeID);
- prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages);
- prefs->RegisterDictionaryPref(prefs::kCurrentThemeColors);
- prefs->RegisterDictionaryPref(prefs::kCurrentThemeTints);
- prefs->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties);
- prefs->RegisterBooleanPref(prefs::kDisableExtensions, false);
- prefs->RegisterStringPref(prefs::kSelectFileLastDirectory, "");
+ ThemeService::kDefaultThemeID,
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages,
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDictionaryPref(prefs::kCurrentThemeColors,
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDictionaryPref(prefs::kCurrentThemeTints,
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties,
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterBooleanPref(prefs::kDisableExtensions,
+ false,
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterStringPref(prefs::kSelectFileLastDirectory,
+ "",
+ PrefService::UNSYNCABLE_PREF);
#if defined(OS_CHROMEOS)
// TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both
// local state and user's profile. For other platforms we maintain
// kApplicationLocale only in local state.
// In the future we may want to maintain kApplicationLocale
// in user's profile for other platforms as well.
- prefs->RegisterStringPref(prefs::kApplicationLocale, "");
- prefs->RegisterStringPref(prefs::kApplicationLocaleBackup, "");
- prefs->RegisterStringPref(prefs::kApplicationLocaleAccepted, "");
+ prefs->RegisterStringPref(prefs::kApplicationLocale,
+ "",
+ PrefService::SYNCABLE_PREF);
+ prefs->RegisterStringPref(prefs::kApplicationLocaleBackup,
+ "",
+ PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterStringPref(prefs::kApplicationLocaleAccepted,
+ "",
+ PrefService::UNSYNCABLE_PREF);
#endif
}
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698