| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Defines the Chrome Extensions Clear API functions, which entail | 5 // Defines the Chrome Extensions Clear API functions, which entail |
| 6 // clearing browsing data, and clearing the browser's cache (which, let's be | 6 // clearing browsing data, and clearing the browser's cache (which, let's be |
| 7 // honest, are the same thing), as specified in | 7 // honest, are the same thing), as specified in |
| 8 // chrome/common/extensions/api/extension_api.json. | 8 // chrome/common/extensions/api/extension_api.json. |
| 9 | 9 |
| 10 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_ | 10 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 // AsyncExtensionFunction interface method. | 36 // AsyncExtensionFunction interface method. |
| 37 virtual bool RunImpl() OVERRIDE; | 37 virtual bool RunImpl() OVERRIDE; |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 // Children should override this method to provide the proper removal mask | 40 // Children should override this method to provide the proper removal mask |
| 41 // based on the API call they represent. | 41 // based on the API call they represent. |
| 42 virtual int GetRemovalMask() const = 0; | 42 virtual int GetRemovalMask() const = 0; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 class ClearAppCacheFunction : public BrowsingDataExtensionFunction { |
| 46 public: |
| 47 ClearAppCacheFunction() {} |
| 48 virtual ~ClearAppCacheFunction() {} |
| 49 |
| 50 protected: |
| 51 // BrowsingDataTypeExtensionFunction interface method. |
| 52 virtual int GetRemovalMask() const OVERRIDE; |
| 53 |
| 54 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.appcache") |
| 55 }; |
| 56 |
| 45 class ClearBrowsingDataFunction : public BrowsingDataExtensionFunction { | 57 class ClearBrowsingDataFunction : public BrowsingDataExtensionFunction { |
| 46 public: | 58 public: |
| 47 ClearBrowsingDataFunction() {} | 59 ClearBrowsingDataFunction() {} |
| 48 virtual ~ClearBrowsingDataFunction() {} | 60 virtual ~ClearBrowsingDataFunction() {} |
| 49 | 61 |
| 50 protected: | 62 protected: |
| 51 // BrowsingDataExtensionFunction interface method. | 63 // BrowsingDataExtensionFunction interface method. |
| 52 virtual int GetRemovalMask() const OVERRIDE; | 64 virtual int GetRemovalMask() const OVERRIDE; |
| 53 | 65 |
| 54 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.browsingData") | 66 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.browsingData") |
| (...skipping 28 matching lines...) Expand all Loading... |
| 83 ClearDownloadsFunction() {} | 95 ClearDownloadsFunction() {} |
| 84 virtual ~ClearDownloadsFunction() {} | 96 virtual ~ClearDownloadsFunction() {} |
| 85 | 97 |
| 86 protected: | 98 protected: |
| 87 // BrowsingDataTypeExtensionFunction interface method. | 99 // BrowsingDataTypeExtensionFunction interface method. |
| 88 virtual int GetRemovalMask() const OVERRIDE; | 100 virtual int GetRemovalMask() const OVERRIDE; |
| 89 | 101 |
| 90 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.downloads") | 102 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.downloads") |
| 91 }; | 103 }; |
| 92 | 104 |
| 105 class ClearFileSystemsFunction : public BrowsingDataExtensionFunction { |
| 106 public: |
| 107 ClearFileSystemsFunction() {} |
| 108 virtual ~ClearFileSystemsFunction() {} |
| 109 |
| 110 protected: |
| 111 // BrowsingDataTypeExtensionFunction interface method. |
| 112 virtual int GetRemovalMask() const OVERRIDE; |
| 113 |
| 114 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.fileSystems") |
| 115 }; |
| 116 |
| 93 class ClearFormDataFunction : public BrowsingDataExtensionFunction { | 117 class ClearFormDataFunction : public BrowsingDataExtensionFunction { |
| 94 public: | 118 public: |
| 95 ClearFormDataFunction() {} | 119 ClearFormDataFunction() {} |
| 96 virtual ~ClearFormDataFunction() {} | 120 virtual ~ClearFormDataFunction() {} |
| 97 | 121 |
| 98 protected: | 122 protected: |
| 99 // BrowsingDataTypeExtensionFunction interface method. | 123 // BrowsingDataTypeExtensionFunction interface method. |
| 100 virtual int GetRemovalMask() const OVERRIDE; | 124 virtual int GetRemovalMask() const OVERRIDE; |
| 101 | 125 |
| 102 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.formData") | 126 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.formData") |
| 103 }; | 127 }; |
| 104 | 128 |
| 105 class ClearHistoryFunction : public BrowsingDataExtensionFunction { | 129 class ClearHistoryFunction : public BrowsingDataExtensionFunction { |
| 106 public: | 130 public: |
| 107 ClearHistoryFunction() {} | 131 ClearHistoryFunction() {} |
| 108 virtual ~ClearHistoryFunction() {} | 132 virtual ~ClearHistoryFunction() {} |
| 109 | 133 |
| 110 protected: | 134 protected: |
| 111 // BrowsingDataTypeExtensionFunction interface method. | 135 // BrowsingDataTypeExtensionFunction interface method. |
| 112 virtual int GetRemovalMask() const OVERRIDE; | 136 virtual int GetRemovalMask() const OVERRIDE; |
| 113 | 137 |
| 114 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.history") | 138 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.history") |
| 115 }; | 139 }; |
| 116 | 140 |
| 141 class ClearIndexedDBFunction : public BrowsingDataExtensionFunction { |
| 142 public: |
| 143 ClearIndexedDBFunction() {} |
| 144 virtual ~ClearIndexedDBFunction() {} |
| 145 |
| 146 protected: |
| 147 // BrowsingDataTypeExtensionFunction interface method. |
| 148 virtual int GetRemovalMask() const OVERRIDE; |
| 149 |
| 150 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.indexedDB") |
| 151 }; |
| 152 |
| 153 class ClearLocalStorageFunction : public BrowsingDataExtensionFunction { |
| 154 public: |
| 155 ClearLocalStorageFunction() {} |
| 156 virtual ~ClearLocalStorageFunction() {} |
| 157 |
| 158 protected: |
| 159 // BrowsingDataTypeExtensionFunction interface method. |
| 160 virtual int GetRemovalMask() const OVERRIDE; |
| 161 |
| 162 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.localStorage") |
| 163 }; |
| 164 |
| 165 class ClearLSODataFunction : public BrowsingDataExtensionFunction { |
| 166 public: |
| 167 ClearLSODataFunction() {} |
| 168 virtual ~ClearLSODataFunction() {} |
| 169 |
| 170 protected: |
| 171 // BrowsingDataTypeExtensionFunction interface method. |
| 172 virtual int GetRemovalMask() const OVERRIDE; |
| 173 |
| 174 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.lsoData") |
| 175 }; |
| 176 |
| 117 class ClearPasswordsFunction : public BrowsingDataExtensionFunction { | 177 class ClearPasswordsFunction : public BrowsingDataExtensionFunction { |
| 118 public: | 178 public: |
| 119 ClearPasswordsFunction() {} | 179 ClearPasswordsFunction() {} |
| 120 virtual ~ClearPasswordsFunction() {} | 180 virtual ~ClearPasswordsFunction() {} |
| 121 | 181 |
| 122 protected: | 182 protected: |
| 123 // BrowsingDataTypeExtensionFunction interface method. | 183 // BrowsingDataTypeExtensionFunction interface method. |
| 124 virtual int GetRemovalMask() const OVERRIDE; | 184 virtual int GetRemovalMask() const OVERRIDE; |
| 125 | 185 |
| 126 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.passwords") | 186 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.passwords") |
| 127 }; | 187 }; |
| 128 | 188 |
| 189 class ClearWebSQLFunction : public BrowsingDataExtensionFunction { |
| 190 public: |
| 191 ClearWebSQLFunction() {} |
| 192 virtual ~ClearWebSQLFunction() {} |
| 193 |
| 194 protected: |
| 195 // BrowsingDataTypeExtensionFunction interface method. |
| 196 virtual int GetRemovalMask() const OVERRIDE; |
| 197 |
| 198 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.webSQL") |
| 199 }; |
| 129 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_ | 200 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_ |
| OLD | NEW |