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

Unified Diff: chrome/browser/extensions/api/settings_private/prefs_util.cc

Issue 2520573002: MD Settings: implement support for extension-controlled startup URLs (Closed)
Patch Set: fix closure? Created 4 years, 1 month 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
Index: chrome/browser/extensions/api/settings_private/prefs_util.cc
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
index e2f86c70b4afac37e0ece158ef55bd2981a117d3..d1c52cca455b66711dfa960f728f22a12e806867 100644
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -696,12 +696,24 @@ const Extension* PrefsUtil::GetExtensionControllingPref(
// corresponds with some indiciator that should be shown in the settings UI.
if (pref_object.key == ::prefs::kHomePage)
return GetExtensionOverridingHomepage(profile_);
+
+ if (pref_object.key == ::prefs::kRestoreOnStartup) {
+ int restore_on_startup;
+ CHECK(pref_object.value->GetAsInteger(&restore_on_startup));
+
+ if (restore_on_startup == SessionStartupPref::kPrefValueURLs)
+ return GetExtensionOverridingStartupPages(profile_);
+ }
+
if (pref_object.key == ::prefs::kURLsToRestoreOnStartup)
return GetExtensionOverridingStartupPages(profile_);
+
if (pref_object.key == ::prefs::kDefaultSearchProviderEnabled)
return GetExtensionOverridingSearchEngine(profile_);
+
if (pref_object.key == proxy_config::prefs::kProxy)
return GetExtensionOverridingProxy(profile_);
+
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698