| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BrowsingData API functions, which entail | 5 // Defines the Chrome Extensions BrowsingData 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 the extension API JSON. | 7 // honest, are the same thing), as specified in the extension API JSON. |
| 8 | 8 |
| 9 #ifndef CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ | 9 #ifndef CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ |
| 10 #define CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ | 10 #define CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 extern const char kFileSystemsKey[]; | 27 extern const char kFileSystemsKey[]; |
| 28 extern const char kFormDataKey[]; | 28 extern const char kFormDataKey[]; |
| 29 extern const char kHistoryKey[]; | 29 extern const char kHistoryKey[]; |
| 30 extern const char kIndexedDBKey[]; | 30 extern const char kIndexedDBKey[]; |
| 31 extern const char kPluginDataKey[]; | 31 extern const char kPluginDataKey[]; |
| 32 extern const char kLocalStorageKey[]; | 32 extern const char kLocalStorageKey[]; |
| 33 extern const char kPasswordsKey[]; | 33 extern const char kPasswordsKey[]; |
| 34 extern const char kWebSQLKey[]; | 34 extern const char kWebSQLKey[]; |
| 35 | 35 |
| 36 // Option keys. | 36 // Option keys. |
| 37 extern const char kExtensionsKey[]; |
| 38 extern const char kOriginTypesKey[]; |
| 39 extern const char kProtectedWebKey[]; |
| 37 extern const char kSinceKey[]; | 40 extern const char kSinceKey[]; |
| 41 extern const char kUnprotectedWebKey[]; |
| 38 | 42 |
| 39 // Errors! | 43 // Errors! |
| 40 extern const char kOneAtATimeError[]; | 44 extern const char kOneAtATimeError[]; |
| 41 | 45 |
| 42 } // namespace extension_browsing_data_api_constants | 46 } // namespace extension_browsing_data_api_constants |
| 43 | 47 |
| 44 // This serves as a base class from which the browsing data API functions will | 48 // This serves as a base class from which the browsing data API functions will |
| 45 // inherit. Each needs to be an observer of BrowsingDataRemover events, and each | 49 // inherit. Each needs to be an observer of BrowsingDataRemover events, and each |
| 46 // will handle those events in the same way (by calling the passed-in callback | 50 // will handle those events in the same way (by calling the passed-in callback |
| 47 // function). | 51 // function). |
| (...skipping 20 matching lines...) Expand all Loading... |
| 68 // Updates the removal bitmask according to whether removing plugin data is | 72 // Updates the removal bitmask according to whether removing plugin data is |
| 69 // supported or not. | 73 // supported or not. |
| 70 void CheckRemovingPluginDataSupported( | 74 void CheckRemovingPluginDataSupported( |
| 71 scoped_refptr<PluginPrefs> plugin_prefs); | 75 scoped_refptr<PluginPrefs> plugin_prefs); |
| 72 | 76 |
| 73 // Called when we're ready to start removing data. | 77 // Called when we're ready to start removing data. |
| 74 void StartRemoving(); | 78 void StartRemoving(); |
| 75 | 79 |
| 76 base::Time remove_since_; | 80 base::Time remove_since_; |
| 77 int removal_mask_; | 81 int removal_mask_; |
| 82 int origin_set_mask_; |
| 78 }; | 83 }; |
| 79 | 84 |
| 80 class RemoveAppCacheFunction : public BrowsingDataExtensionFunction { | 85 class RemoveAppCacheFunction : public BrowsingDataExtensionFunction { |
| 81 public: | 86 public: |
| 82 DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeAppcache") | 87 DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeAppcache") |
| 83 | 88 |
| 84 protected: | 89 protected: |
| 85 virtual ~RemoveAppCacheFunction() {} | 90 virtual ~RemoveAppCacheFunction() {} |
| 86 | 91 |
| 87 // BrowsingDataTypeExtensionFunction: | 92 // BrowsingDataTypeExtensionFunction: |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeWebSQL") | 230 DECLARE_EXTENSION_FUNCTION_NAME("browsingData.removeWebSQL") |
| 226 | 231 |
| 227 protected: | 232 protected: |
| 228 virtual ~RemoveWebSQLFunction() {} | 233 virtual ~RemoveWebSQLFunction() {} |
| 229 | 234 |
| 230 // BrowsingDataExtensionFunction: | 235 // BrowsingDataExtensionFunction: |
| 231 virtual int GetRemovalMask() const OVERRIDE; | 236 virtual int GetRemovalMask() const OVERRIDE; |
| 232 }; | 237 }; |
| 233 | 238 |
| 234 #endif // CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ | 239 #endif // CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ |
| OLD | NEW |