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

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

Issue 11419307: Garbage Collect the Storage directory on next profile start after an extension uninstall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Basic code done. Created 8 years 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
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index a26f3ad4cd0992ead9258af17b7c3360f6b8181a..b63c4e6f28fd09bb87009fca331f0b4b2f8c63a1 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -1875,7 +1875,7 @@ bool ExtensionPrefs::GetSideloadWipeoutDone() const {
}
void ExtensionPrefs::SetSideloadWipeoutDone() {
- return prefs_->SetBoolean(kSideloadWipeoutDone, true);
+ prefs_->SetBoolean(kSideloadWipeoutDone, true);
}
bool ExtensionPrefs::WasAppDraggedByUser(const std::string& extension_id) {
@@ -2254,6 +2254,14 @@ void ExtensionPrefs::Init(bool extensions_disabled) {
content_settings_store_->AddObserver(this);
}
+void ExtensionPrefs::SetNeedsStorageGarbageCollection(bool value) {
+ prefs_->SetBoolean(prefs::kExtensionStorageGarbageCollect, value);
+}
+
+bool ExtensionPrefs::NeedsStorageGarbageCollection() {
+ return prefs_->GetBoolean(prefs::kExtensionStorageGarbageCollect);
+}
+
// static
void ExtensionPrefs::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterDictionaryPref(kExtensionsPref, PrefService::UNSYNCABLE_PREF);
@@ -2277,6 +2285,11 @@ void ExtensionPrefs::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterStringPref(prefs::kExtensionBlacklistUpdateVersion,
"0", // default value
PrefService::UNSYNCABLE_PREF);
+ // TODO(ajwong): Should this be syncable? What happens when you sync an
+ // extension uninstall?
Charlie Reis 2012/12/05 02:25:40 I'm guessing it should not be syncable. Each inst
awong 2012/12/08 01:45:23 Agreed. Removed comment.
+ prefs->RegisterBooleanPref(prefs::kExtensionStorageGarbageCollect,
+ false, // default value
+ PrefService::UNSYNCABLE_PREF);
prefs->RegisterInt64Pref(prefs::kLastExtensionsUpdateCheck,
0, // default value
PrefService::UNSYNCABLE_PREF);

Powered by Google App Engine
This is Rietveld 408576698