diff options
author | tbreisacher@chromium.org <tbreisacher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-23 20:10:36 +0000 |
---|---|---|
committer | tbreisacher@chromium.org <tbreisacher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-23 20:10:36 +0000 |
commit | 9bbbc0761c37d495457c9bbf5d6873416043ec6b (patch) | |
tree | f523c23b96f2cbbd39f26b23d246f68bc4ea874c /chrome/browser/prefs | |
parent | 5ce53d296d6632b29786bbaecb69587b970c2d24 (diff) | |
download | chromium_src-9bbbc0761c37d495457c9bbf5d6873416043ec6b.zip chromium_src-9bbbc0761c37d495457c9bbf5d6873416043ec6b.tar.gz chromium_src-9bbbc0761c37d495457c9bbf5d6873416043ec6b.tar.bz2 |
Update RestoreOnStartupPolicyHandler to translate to the correct preferences
BUG=124027
TEST=pyauto:policy.PolicyTest.testStartupOptionsHomepage
Review URL: http://codereview.chromium.org/10035043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prefs')
-rw-r--r-- | chrome/browser/prefs/session_startup_pref.cc | 13 | ||||
-rw-r--r-- | chrome/browser/prefs/session_startup_pref.h | 7 |
2 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc index a546dd7..29c6f47 100644 --- a/chrome/browser/prefs/session_startup_pref.cc +++ b/chrome/browser/prefs/session_startup_pref.cc @@ -25,19 +25,12 @@ using protector::ProtectorServiceFactory; namespace { -// For historical reasons the enum and value registered in the prefs don't line -// up. These are the values registered in prefs. -const int kPrefValueHomePage = 0; // Deprecated -const int kPrefValueLast = 1; -const int kPrefValueURLs = 4; -const int kPrefValueNewTab = 5; - // Converts a SessionStartupPref::Type to an integer written to prefs. int TypeToPrefValue(SessionStartupPref::Type type) { switch (type) { - case SessionStartupPref::LAST: return kPrefValueLast; - case SessionStartupPref::URLS: return kPrefValueURLs; - default: return kPrefValueNewTab; + case SessionStartupPref::LAST: return SessionStartupPref::kPrefValueLast; + case SessionStartupPref::URLS: return SessionStartupPref::kPrefValueURLs; + default: return SessionStartupPref::kPrefValueNewTab; } } diff --git a/chrome/browser/prefs/session_startup_pref.h b/chrome/browser/prefs/session_startup_pref.h index 4914e2f..11c4180 100644 --- a/chrome/browser/prefs/session_startup_pref.h +++ b/chrome/browser/prefs/session_startup_pref.h @@ -34,6 +34,13 @@ struct SessionStartupPref { TYPE_COUNT }; + // For historical reasons the enum and value registered in the prefs don't + // line up. These are the values registered in prefs. + static const int kPrefValueHomePage = 0; // Deprecated + static const int kPrefValueLast = 1; + static const int kPrefValueURLs = 4; + static const int kPrefValueNewTab = 5; + static void RegisterUserPrefs(PrefService* prefs); // Returns the default value for |type|. |