diff options
author | ivankr@chromium.org <ivankr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-23 20:37:42 +0000 |
---|---|---|
committer | ivankr@chromium.org <ivankr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-23 20:37:42 +0000 |
commit | ccfbc867f99730047cc51a75a63395e1fa2c9deb (patch) | |
tree | 23e52a4aedd0298e6685c2226fa4bf5c1547126c /chrome/browser/protector | |
parent | 08bdf169df239148d30ff4c22dd6095b93b73834 (diff) | |
download | chromium_src-ccfbc867f99730047cc51a75a63395e1fa2c9deb.zip chromium_src-ccfbc867f99730047cc51a75a63395e1fa2c9deb.tar.gz chromium_src-ccfbc867f99730047cc51a75a63395e1fa2c9deb.tar.bz2 |
Cleanup Protector switches and prefs.
*) Removed temporary 'protector.enabled' pref.
*) Renamed --disable-protector back to --no-protector ("bad flag" on platforms other than ChromeOS).
BUG=None
TEST=Manual with and without --no-protector
Review URL: http://codereview.chromium.org/9270041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/protector')
-rw-r--r-- | chrome/browser/protector/protector_service.cc | 14 | ||||
-rw-r--r-- | chrome/browser/protector/protector_service.h | 3 |
2 files changed, 1 insertions, 16 deletions
diff --git a/chrome/browser/protector/protector_service.cc b/chrome/browser/protector/protector_service.cc index 6df0f38..2464c0e 100644 --- a/chrome/browser/protector/protector_service.cc +++ b/chrome/browser/protector/protector_service.cc @@ -125,20 +125,8 @@ bool IsSettingValid(const std::string& value, const std::string& signature) { return hmac.Verify(value, signature); } -void RegisterPrefs(PrefService* prefs) { - prefs->RegisterBooleanPref(prefs::kProtectorEnabled, false); -} - bool IsEnabled() { - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableProtector)) - return false; -#if !defined(OS_CHROMEOS) - // Protector is always enabled on platforms other than ChromeOS. - return true; -#else - PrefService* local_state = g_browser_process->local_state(); - return local_state->GetBoolean(prefs::kProtectorEnabled); -#endif + return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoProtector); } } // namespace protector diff --git a/chrome/browser/protector/protector_service.h b/chrome/browser/protector/protector_service.h index 7d56166..28e1b6f 100644 --- a/chrome/browser/protector/protector_service.h +++ b/chrome/browser/protector/protector_service.h @@ -86,9 +86,6 @@ std::string SignSetting(const std::string& value); // Returns true if the signature is valid for the specified key. bool IsSettingValid(const std::string& value, const std::string& signature); -// Register related preferences in Local State. -void RegisterPrefs(PrefService* prefs); - // Whether the Protector feature is enabled. bool IsEnabled(); |