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

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

Issue 8008012: chrome.clear: Increasing granularity of public API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing after 2 months (ugh). Extension test. Fiddling. Created 9 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_clear_api.h
diff --git a/chrome/browser/extensions/extension_clear_api.h b/chrome/browser/extensions/extension_clear_api.h
index af193d7e84c0baaf1f7f522e59c6d39435d52a38..9e80acce049aa744f3ff7d322047ca961b4d937d 100644
--- a/chrome/browser/extensions/extension_clear_api.h
+++ b/chrome/browser/extensions/extension_clear_api.h
@@ -17,6 +17,34 @@
class PluginPrefs;
+namespace extension_clear_api_constants {
+
+// Keys.
+extern const char kAppCacheKey[];
+extern const char kCacheKey[];
+extern const char kCookiesKey[];
+extern const char kDownloadsKey[];
+extern const char kFileSystemsKey[];
+extern const char kFormDataKey[];
+extern const char kHistoryKey[];
+extern const char kIndexedDBKey[];
+extern const char kLSODataKey[];
+extern const char kLocalStorageKey[];
+extern const char kPasswordsKey[];
+extern const char kWebSQLKey[];
+
+// Timeframe "enum" values.
+extern const char kHourEnum[];
+extern const char kDayEnum[];
+extern const char kWeekEnum[];
+extern const char kMonthEnum[];
+extern const char kEverythingEnum[];
+
+// Errors!
+extern const char kOneAtATimeError[];
+
+} // namespace extension_clear_api_constants
+
// This serves as a base class from which the browsing data API functions will
// inherit. Each needs to be an observer of BrowsingDataRemover events, and each
// will handle those events in the same way (by calling the passed-in callback
@@ -50,6 +78,18 @@ class BrowsingDataExtensionFunction : public AsyncExtensionFunction,
int removal_mask_;
};
+class ClearAppCacheFunction : public BrowsingDataExtensionFunction {
+ public:
+ ClearAppCacheFunction() {}
+ virtual ~ClearAppCacheFunction() {}
+
+ protected:
+ // BrowsingDataTypeExtensionFunction interface method.
+ virtual int GetRemovalMask() const OVERRIDE;
+
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.appcache")
+};
+
class ClearBrowsingDataFunction : public BrowsingDataExtensionFunction {
public:
ClearBrowsingDataFunction() {}
@@ -98,6 +138,18 @@ class ClearDownloadsFunction : public BrowsingDataExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.downloads")
};
+class ClearFileSystemsFunction : public BrowsingDataExtensionFunction {
+ public:
+ ClearFileSystemsFunction() {}
+ virtual ~ClearFileSystemsFunction() {}
+
+ protected:
+ // BrowsingDataTypeExtensionFunction interface method.
+ virtual int GetRemovalMask() const OVERRIDE;
+
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.fileSystems")
+};
+
class ClearFormDataFunction : public BrowsingDataExtensionFunction {
public:
ClearFormDataFunction() {}
@@ -122,6 +174,42 @@ class ClearHistoryFunction : public BrowsingDataExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.history")
};
+class ClearIndexedDBFunction : public BrowsingDataExtensionFunction {
+ public:
+ ClearIndexedDBFunction() {}
+ virtual ~ClearIndexedDBFunction() {}
+
+ protected:
+ // BrowsingDataTypeExtensionFunction interface method.
+ virtual int GetRemovalMask() const OVERRIDE;
+
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.indexedDB")
+};
+
+class ClearLocalStorageFunction : public BrowsingDataExtensionFunction {
+ public:
+ ClearLocalStorageFunction() {}
+ virtual ~ClearLocalStorageFunction() {}
+
+ protected:
+ // BrowsingDataTypeExtensionFunction interface method.
+ virtual int GetRemovalMask() const OVERRIDE;
+
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.localStorage")
+};
+
+class ClearLSODataFunction : public BrowsingDataExtensionFunction {
+ public:
+ ClearLSODataFunction() {}
+ virtual ~ClearLSODataFunction() {}
+
+ protected:
+ // BrowsingDataTypeExtensionFunction interface method.
+ virtual int GetRemovalMask() const OVERRIDE;
+
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.lsoData")
+};
+
class ClearPasswordsFunction : public BrowsingDataExtensionFunction {
public:
ClearPasswordsFunction() {}
@@ -134,4 +222,15 @@ class ClearPasswordsFunction : public BrowsingDataExtensionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.passwords")
};
+class ClearWebSQLFunction : public BrowsingDataExtensionFunction {
+ public:
+ ClearWebSQLFunction() {}
+ virtual ~ClearWebSQLFunction() {}
+
+ protected:
+ // BrowsingDataTypeExtensionFunction interface method.
+ virtual int GetRemovalMask() const OVERRIDE;
+
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.webSQL")
+};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_

Powered by Google App Engine
This is Rietveld 408576698