diff options
author | treib <treib@chromium.org> | 2016-01-15 12:05:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-15 20:06:53 +0000 |
commit | 7019069164be3b8dd39dbfcbb79fe078551e46cf (patch) | |
tree | 01c717d46ed3c0e5823e8dd3821a0cdd1428c1c6 /extensions | |
parent | 4b10302fb35804092add990a31336c41411448c9 (diff) | |
download | chromium_src-7019069164be3b8dd39dbfcbb79fe078551e46cf.zip chromium_src-7019069164be3b8dd39dbfcbb79fe078551e46cf.tar.gz chromium_src-7019069164be3b8dd39dbfcbb79fe078551e46cf.tar.bz2 |
Extensions: remove DeprecatedDisableReason
This was deprecated > 3 years ago in https://chromiumcodereview.appspot.com/10828316.
Let's assume everything's migrated by now.
BUG=none
Review URL: https://codereview.chromium.org/1594553004
Cr-Commit-Position: refs/heads/master@{#369822}
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/browser/extension_prefs.cc | 32 | ||||
-rw-r--r-- | extensions/browser/extension_prefs.h | 3 | ||||
-rw-r--r-- | extensions/common/extension.h | 9 |
3 files changed, 0 insertions, 44 deletions
diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc index 6f584d0..839f6ff 100644 --- a/extensions/browser/extension_prefs.cc +++ b/extensions/browser/extension_prefs.cc @@ -81,10 +81,6 @@ const char kPrefBlacklistAcknowledged[] = "ack_blacklist"; // run of this profile. const char kPrefExternalInstallFirstRun[] = "external_first_run"; -// DO NOT USE, use kPrefDisableReasons instead. -// Indicates whether the extension was updated while it was disabled. -const char kDeprecatedPrefDisableReason[] = "disable_reason"; - // A bitmask of all the reasons an extension is disabled. const char kPrefDisableReasons[] = "disable_reasons"; @@ -998,33 +994,6 @@ void ExtensionPrefs::MigratePermissions(const ExtensionIdList& extension_ids) { } } -void ExtensionPrefs::MigrateDisableReasons( - const ExtensionIdList& extension_ids) { - for (ExtensionIdList::const_iterator ext_id = - extension_ids.begin(); ext_id != extension_ids.end(); ++ext_id) { - int value = -1; - if (ReadPrefAsInteger(*ext_id, kDeprecatedPrefDisableReason, &value)) { - int new_value = Extension::DISABLE_NONE; - switch (value) { - case Extension::DEPRECATED_DISABLE_USER_ACTION: - new_value = Extension::DISABLE_USER_ACTION; - break; - case Extension::DEPRECATED_DISABLE_PERMISSIONS_INCREASE: - new_value = Extension::DISABLE_PERMISSIONS_INCREASE; - break; - case Extension::DEPRECATED_DISABLE_RELOAD: - new_value = Extension::DISABLE_RELOAD; - break; - } - - UpdateExtensionPref(*ext_id, kPrefDisableReasons, - new base::FundamentalValue(new_value)); - // Remove the old disable reason. - UpdateExtensionPref(*ext_id, kDeprecatedPrefDisableReason, NULL); - } - } -} - scoped_ptr<const PermissionSet> ExtensionPrefs::GetGrantedPermissions( const std::string& extension_id) const { CHECK(crx_file::id_util::IdIsValid(extension_id)); @@ -1739,7 +1708,6 @@ void ExtensionPrefs::InitPrefStore() { FixMissingPrefs(extension_ids); MigratePermissions(extension_ids); - MigrateDisableReasons(extension_ids); InitExtensionControlledPrefs(extension_pref_value_map_); diff --git a/extensions/browser/extension_prefs.h b/extensions/browser/extension_prefs.h index f86b02e..13bff1e 100644 --- a/extensions/browser/extension_prefs.h +++ b/extensions/browser/extension_prefs.h @@ -633,9 +633,6 @@ class ExtensionPrefs : public ExtensionScopedPrefs, public KeyedService { // Migrates the permissions data in the pref store. void MigratePermissions(const ExtensionIdList& extension_ids); - // Migrates the disable reasons from a single enum to a bit mask. - void MigrateDisableReasons(const ExtensionIdList& extension_ids); - // Checks whether there is a state pref for the extension and if so, whether // it matches |check_state|. bool DoesExtensionHaveState(const std::string& id, diff --git a/extensions/common/extension.h b/extensions/common/extension.h index ec71517..25035ee 100644 --- a/extensions/common/extension.h +++ b/extensions/common/extension.h @@ -73,15 +73,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> { NUM_STATES }; - // Used to record the reason an extension was disabled. - enum DeprecatedDisableReason { - DEPRECATED_DISABLE_UNKNOWN, - DEPRECATED_DISABLE_USER_ACTION, - DEPRECATED_DISABLE_PERMISSIONS_INCREASE, - DEPRECATED_DISABLE_RELOAD, - DEPRECATED_DISABLE_LAST, // Not used. - }; - // Reasons an extension may be disabled. These are used in histograms, so do // not remove/reorder entries - only add at the end just before // DISABLE_REASON_LAST (and update the shift value for it). Also remember to |