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

Unified Diff: chrome/browser/extensions/extension_prefs.cc

Issue 11189094: Implement sideload wipeout for Extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
===================================================================
--- chrome/browser/extensions/extension_prefs.cc (revision 162977)
+++ chrome/browser/extensions/extension_prefs.cc (working copy)
@@ -222,6 +222,9 @@
// Key for what version chrome was last time the extension prefs were loaded.
const char kExtensionsLastChromeVersion[] = "extensions.last_chrome_version";
+// Key for whether the sideload wipeout effort is done.
+const char kSideloadWipeoutDone[] = "extensions.sideload_wipeout_done";
+
// Provider of write access to a dictionary storing extension prefs.
class ScopedExtensionPrefUpdate : public DictionaryPrefUpdate {
public:
@@ -1806,6 +1809,14 @@
prefs_->SetString(kWebStoreLogin, login);
}
+bool ExtensionPrefs::GetSideloadWipeoutDone() const {
+ return prefs_->GetBoolean(kSideloadWipeoutDone);
+}
+
+void ExtensionPrefs::SetSideloadWipeoutDone() {
+ return prefs_->SetBoolean(kSideloadWipeoutDone, true);
+}
+
bool ExtensionPrefs::WasAppDraggedByUser(const std::string& extension_id) {
return ReadExtensionPrefBoolean(extension_id, kPrefUserDraggedApp);
}
@@ -2198,6 +2209,9 @@
prefs->RegisterStringPref(kExtensionsLastChromeVersion,
std::string(), // default value
PrefService::UNSYNCABLE_PREF);
+ prefs->RegisterBooleanPref(kSideloadWipeoutDone,
+ false,
+ PrefService::UNSYNCABLE_PREF);
}
ExtensionIdList ExtensionPrefs::GetExtensionPrefAsVector(
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698