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

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

Issue 8008012: chrome.clear: Increasing granularity of public API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
Index: chrome/browser/extensions/extension_clear_api.cc
diff --git a/chrome/browser/extensions/extension_clear_api.cc b/chrome/browser/extensions/extension_clear_api.cc
index f2fc800d1dc59a0f4f2eab229a73923e4fbc9a94..c6d2bf61343111d9bc7d320ab93627ae3cfef0a0 100644
--- a/chrome/browser/extensions/extension_clear_api.cc
+++ b/chrome/browser/extensions/extension_clear_api.cc
@@ -59,21 +59,30 @@ bool DataRemovalRequested(base::DictionaryValue* dict, std::string key) {
// appropriate removal mask for the BrowsingDataRemover object.
int ParseRemovalMask(base::DictionaryValue* value) {
int GetRemovalMask = 0;
+ if (DataRemovalRequested(value, keys::kAppCacheKey))
+ GetRemovalMask |= BrowsingDataRemover::REMOVE_APPCACHE;
if (DataRemovalRequested(value, keys::kCacheKey))
GetRemovalMask |= BrowsingDataRemover::REMOVE_CACHE;
+ if (DataRemovalRequested(value, keys::kCookiesKey))
+ GetRemovalMask |= BrowsingDataRemover::REMOVE_COOKIES;
if (DataRemovalRequested(value, keys::kDownloadsKey))
GetRemovalMask |= BrowsingDataRemover::REMOVE_DOWNLOADS;
+ if (DataRemovalRequested(value, keys::kPasswordsKey))
+ GetRemovalMask |= BrowsingDataRemover::REMOVE_FILE_SYSTEMS;
if (DataRemovalRequested(value, keys::kFormDataKey))
GetRemovalMask |= BrowsingDataRemover::REMOVE_FORM_DATA;
if (DataRemovalRequested(value, keys::kHistoryKey))
GetRemovalMask |= BrowsingDataRemover::REMOVE_HISTORY;
if (DataRemovalRequested(value, keys::kPasswordsKey))
+ GetRemovalMask |= BrowsingDataRemover::REMOVE_INDEXEDDB;
+ if (DataRemovalRequested(value, keys::kPasswordsKey))
+ GetRemovalMask |= BrowsingDataRemover::REMOVE_LOCAL_STORAGE;
+ if (DataRemovalRequested(value, keys::kPasswordsKey))
+ GetRemovalMask |= BrowsingDataRemover::REMOVE_LSO_DATA;
+ if (DataRemovalRequested(value, keys::kPasswordsKey))
GetRemovalMask |= BrowsingDataRemover::REMOVE_PASSWORDS;
-
- // When we talk users about "cookies", we mean not just cookies, but pretty
- // much everything associated with an origin.
- if (DataRemovalRequested(value, keys::kCookiesKey))
- GetRemovalMask |= BrowsingDataRemover::REMOVE_SITE_DATA;
+ if (DataRemovalRequested(value, keys::kPasswordsKey))
+ GetRemovalMask |= BrowsingDataRemover::REMOVE_WEBSQL;
return GetRemovalMask;
}
@@ -124,18 +133,26 @@ int ClearBrowsingDataFunction::GetRemovalMask() const {
return 0;
}
+int ClearAppCacheFunction::GetRemovalMask() const {
+ return BrowsingDataRemover::REMOVE_APPCACHE;
Aaron Boodman 2011/10/13 02:19:19 Idea: Did you know that you can get the function n
Mike West 2011/12/13 11:27:23 This is a good idea, but I'd like to do it in a se
+}
+
int ClearCacheFunction::GetRemovalMask() const {
return BrowsingDataRemover::REMOVE_CACHE;
}
int ClearCookiesFunction::GetRemovalMask() const {
- return BrowsingDataRemover::REMOVE_SITE_DATA;
+ return BrowsingDataRemover::REMOVE_COOKIES;
}
int ClearDownloadsFunction::GetRemovalMask() const {
return BrowsingDataRemover::REMOVE_DOWNLOADS;
}
+int ClearFileSystemsFunction::GetRemovalMask() const {
+ return BrowsingDataRemover::REMOVE_FILE_SYSTEMS;
+}
+
int ClearFormDataFunction::GetRemovalMask() const {
return BrowsingDataRemover::REMOVE_FORM_DATA;
}
@@ -144,6 +161,22 @@ int ClearHistoryFunction::GetRemovalMask() const {
return BrowsingDataRemover::REMOVE_HISTORY;
}
+int ClearIndexedDBFunction::GetRemovalMask() const {
+ return BrowsingDataRemover::REMOVE_INDEXEDDB;
+}
+
+int ClearLocalStorageFunction::GetRemovalMask() const {
+ return BrowsingDataRemover::REMOVE_LOCAL_STORAGE;
+}
+
+int ClearLSODataFunction::GetRemovalMask() const {
+ return BrowsingDataRemover::REMOVE_LSO_DATA;
+}
+
int ClearPasswordsFunction::GetRemovalMask() const {
- return BrowsingDataRemover::REMOVE_CACHE;
+ return BrowsingDataRemover::REMOVE_PASSWORDS;
+}
+
+int ClearWebSQLFunction::GetRemovalMask() const {
+ return BrowsingDataRemover::REMOVE_WEBSQL;
}

Powered by Google App Engine
This is Rietveld 408576698