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

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

Issue 2049543003: Make some profile-related prefs non-syncable on mobile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index d573936d3f6c02e02a53477c22dcc20ae4e3f3bf..6e7c18a86c8bd5940e4f46615bbe0f6f537866c5 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -329,6 +329,20 @@ void ProfileImpl::RegisterProfilePrefs(
registry->RegisterBooleanPref(prefs::kForceYouTubeSafetyMode, false);
registry->RegisterBooleanPref(prefs::kForceSessionSync, false);
registry->RegisterStringPref(prefs::kAllowedDomainsForApps, std::string());
+
+#if defined(OS_ANDROID)
+ // The following prefs don't need to be sync'd to mobile. This file isn't
+ // compiled on iOS so we only need to exclude them syncing from the Android
+ // build.
+ registry->RegisterIntegerPref(prefs::kProfileAvatarIndex, -1);
+ // Whether a profile is using an avatar without having explicitely chosen it
+ // (i.e. was assigned by default by legacy profile creation).
+ registry->RegisterBooleanPref(prefs::kProfileUsingDefaultAvatar, true);
+ registry->RegisterBooleanPref(prefs::kProfileUsingGAIAAvatar, false);
+ // Whether a profile is using a default avatar name (eg. Pickles or Person 1).
+ registry->RegisterBooleanPref(prefs::kProfileUsingDefaultName, true);
+ registry->RegisterStringPref(prefs::kProfileName, std::string());
+#else
registry->RegisterIntegerPref(
prefs::kProfileAvatarIndex,
-1,
@@ -348,10 +362,12 @@ void ProfileImpl::RegisterProfilePrefs(
prefs::kProfileUsingDefaultName,
true,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
- registry->RegisterStringPref(prefs::kSupervisedUserId, std::string());
registry->RegisterStringPref(prefs::kProfileName,
std::string(),
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+#endif
+
+ registry->RegisterStringPref(prefs::kSupervisedUserId, std::string());
registry->RegisterStringPref(prefs::kHomePage,
std::string(),
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698