| Index: chrome/browser/extensions/api/browsing_data/browsing_data_api.h
|
| diff --git a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h
|
| index 8ffab0f25df8fa83f747f9f5e7fa4554bc09cdfa..5231cb9c6b29ea2bd985d736b6b9c1e3209e4171 100644
|
| --- a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h
|
| +++ b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h
|
| @@ -9,6 +9,7 @@
|
| #ifndef CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_
|
| #define CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_
|
|
|
| +#include <set>
|
| #include <string>
|
|
|
| #include "base/scoped_observer.h"
|
| @@ -18,6 +19,12 @@
|
| class PluginPrefs;
|
| class PrefService;
|
|
|
| +namespace content {
|
| +struct BrowsingDataType;
|
| +}
|
| +
|
| +using content::BrowsingDataType;
|
| +
|
| namespace extension_browsing_data_api_constants {
|
|
|
| // Parameter name keys.
|
| @@ -102,7 +109,8 @@ class BrowsingDataRemoverFunction : public ChromeAsyncExtensionFunction,
|
| // based on the API call they represent.
|
| // Returns whether or not removal mask retrieval was successful.
|
| // |removal_mask| is populated with the result, if successful.
|
| - virtual bool GetRemovalMask(int* removal_mask) = 0;
|
| + virtual bool GetRemovalMask(
|
| + std::set<const BrowsingDataType*>* removal_mask) = 0;
|
|
|
| private:
|
| // Updates the removal bitmask according to whether removing plugin data is
|
| @@ -120,7 +128,7 @@ class BrowsingDataRemoverFunction : public ChromeAsyncExtensionFunction,
|
| void StartRemoving();
|
|
|
| base::Time remove_since_;
|
| - int removal_mask_;
|
| + std::set<const BrowsingDataType*> removal_mask_;
|
| int origin_type_mask_;
|
| ScopedObserver<BrowsingDataRemover, BrowsingDataRemover::Observer> observer_;
|
| };
|
| @@ -134,7 +142,7 @@ class BrowsingDataRemoveAppcacheFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveAppcacheFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveFunction : public BrowsingDataRemoverFunction {
|
| @@ -145,7 +153,7 @@ class BrowsingDataRemoveFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveCacheFunction : public BrowsingDataRemoverFunction {
|
| @@ -157,7 +165,7 @@ class BrowsingDataRemoveCacheFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveCacheFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveCookiesFunction : public BrowsingDataRemoverFunction {
|
| @@ -169,7 +177,7 @@ class BrowsingDataRemoveCookiesFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveCookiesFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveDownloadsFunction : public BrowsingDataRemoverFunction {
|
| @@ -181,7 +189,7 @@ class BrowsingDataRemoveDownloadsFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveDownloadsFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveFileSystemsFunction
|
| @@ -194,7 +202,7 @@ class BrowsingDataRemoveFileSystemsFunction
|
| ~BrowsingDataRemoveFileSystemsFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveFormDataFunction : public BrowsingDataRemoverFunction {
|
| @@ -206,7 +214,7 @@ class BrowsingDataRemoveFormDataFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveFormDataFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveHistoryFunction : public BrowsingDataRemoverFunction {
|
| @@ -218,7 +226,7 @@ class BrowsingDataRemoveHistoryFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveHistoryFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveIndexedDBFunction : public BrowsingDataRemoverFunction {
|
| @@ -230,7 +238,7 @@ class BrowsingDataRemoveIndexedDBFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveIndexedDBFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveLocalStorageFunction
|
| @@ -243,7 +251,7 @@ class BrowsingDataRemoveLocalStorageFunction
|
| ~BrowsingDataRemoveLocalStorageFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemovePluginDataFunction
|
| @@ -256,7 +264,7 @@ class BrowsingDataRemovePluginDataFunction
|
| ~BrowsingDataRemovePluginDataFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemovePasswordsFunction : public BrowsingDataRemoverFunction {
|
| @@ -268,7 +276,7 @@ class BrowsingDataRemovePasswordsFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemovePasswordsFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveServiceWorkersFunction
|
| @@ -281,7 +289,7 @@ class BrowsingDataRemoveServiceWorkersFunction
|
| ~BrowsingDataRemoveServiceWorkersFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveCacheStorageFunction
|
| @@ -294,7 +302,7 @@ class BrowsingDataRemoveCacheStorageFunction
|
| ~BrowsingDataRemoveCacheStorageFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| class BrowsingDataRemoveWebSQLFunction : public BrowsingDataRemoverFunction {
|
| @@ -306,7 +314,7 @@ class BrowsingDataRemoveWebSQLFunction : public BrowsingDataRemoverFunction {
|
| ~BrowsingDataRemoveWebSQLFunction() override {}
|
|
|
| // BrowsingDataRemoverFunction:
|
| - bool GetRemovalMask(int* removal_mask) override;
|
| + bool GetRemovalMask(std::set<const BrowsingDataType*>* removal_mask) override;
|
| };
|
|
|
| #endif // CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_
|
|
|