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

Unified Diff: chrome/browser/prefs/session_startup_pref.cc

Issue 10417032: Disable sync promo when RestoreOnStartupURLs policy is used (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nit addressed. Created 8 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/prefs/session_startup_pref.h ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/session_startup_pref.cc
diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc
index d8f22ca4e4191c89d42869c8d8b08e8cd101b0ee..6ca978e13e3914d1ca1467c4364346747a7aaaf3 100644
--- a/chrome/browser/prefs/session_startup_pref.cc
+++ b/chrome/browser/prefs/session_startup_pref.cc
@@ -202,6 +202,15 @@ bool SessionStartupPref::URLsAreManaged(PrefService* prefs) {
}
// static
+bool SessionStartupPref::TypeIsDefault(PrefService* prefs) {
+ DCHECK(prefs);
+ const PrefService::Preference* pref_restore =
+ prefs->FindPreference(prefs::kRestoreOnStartup);
+ DCHECK(pref_restore);
+ return pref_restore->IsDefaultValue();
+}
+
+// static
SessionStartupPref::Type SessionStartupPref::PrefValueToType(int pref_value) {
switch (pref_value) {
case kPrefValueLast: return SessionStartupPref::LAST;
« no previous file with comments | « chrome/browser/prefs/session_startup_pref.h ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698