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

Unified Diff: chrome/browser/ui/browser_ui_prefs.cc

Issue 2086143004: Don't sync browser.show_home_button and homepage_is_newtabpage to mobile platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make homepage_is_newtabpage also unsyncable on mobile 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/ui/browser_ui_prefs.cc
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
index e14a72b70c0c762a1a1a713ab0c40920b62e6f59..3c1f3cc0177bb2fab5454b93e5fedcc84f36561c 100644
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -19,6 +19,18 @@
#include "base/win/windows_version.h"
#endif
+namespace {
+
+uint32_t GetHomeButtonAndHomePageIsNewTabPageFlags() {
+#if defined(OS_IOS) || defined(OS_ANDROID)
+ return PrefRegistry::NO_REGISTRATION_FLAGS;
+#else
+ return user_prefs::PrefRegistrySyncable::SYNCABLE_PREF;
+#endif
+}
+
+} // namespace
+
namespace chrome {
void RegisterBrowserPrefs(PrefRegistrySimple* registry) {
@@ -32,11 +44,9 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
prefs::kHomePageIsNewTabPage,
true,
- user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
- registry->RegisterBooleanPref(
- prefs::kShowHomeButton,
- false,
- user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+ GetHomeButtonAndHomePageIsNewTabPageFlags());
+ registry->RegisterBooleanPref(prefs::kShowHomeButton, false,
+ GetHomeButtonAndHomePageIsNewTabPageFlags());
registry->RegisterBooleanPref(
prefs::kDeleteBrowsingHistory,
true,
« 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