| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // | 79 // |
| 80 // Each child class must implement GetRemovalMask(), which returns the bitmask | 80 // Each child class must implement GetRemovalMask(), which returns the bitmask |
| 81 // of data types to remove. | 81 // of data types to remove. |
| 82 class BrowsingDataRemoverFunction : public ChromeAsyncExtensionFunction, | 82 class BrowsingDataRemoverFunction : public ChromeAsyncExtensionFunction, |
| 83 public BrowsingDataRemover::Observer { | 83 public BrowsingDataRemover::Observer { |
| 84 public: | 84 public: |
| 85 // BrowsingDataRemover::Observer interface method. | 85 // BrowsingDataRemover::Observer interface method. |
| 86 virtual void OnBrowsingDataRemoverDone() OVERRIDE; | 86 virtual void OnBrowsingDataRemoverDone() OVERRIDE; |
| 87 | 87 |
| 88 // ExtensionFunction: | 88 // ExtensionFunction: |
| 89 virtual bool RunImpl() OVERRIDE; | 89 virtual bool RunAsync() OVERRIDE; |
| 90 | 90 |
| 91 protected: | 91 protected: |
| 92 virtual ~BrowsingDataRemoverFunction() {} | 92 virtual ~BrowsingDataRemoverFunction() {} |
| 93 | 93 |
| 94 // Children should override this method to provide the proper removal mask | 94 // Children should override this method to provide the proper removal mask |
| 95 // based on the API call they represent. | 95 // based on the API call they represent. |
| 96 virtual int GetRemovalMask() = 0; | 96 virtual int GetRemovalMask() = 0; |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 // Updates the removal bitmask according to whether removing plugin data is | 99 // Updates the removal bitmask according to whether removing plugin data is |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 BROWSINGDATA_REMOVEWEBSQL) | 265 BROWSINGDATA_REMOVEWEBSQL) |
| 266 | 266 |
| 267 protected: | 267 protected: |
| 268 virtual ~BrowsingDataRemoveWebSQLFunction() {} | 268 virtual ~BrowsingDataRemoveWebSQLFunction() {} |
| 269 | 269 |
| 270 // BrowsingDataRemoverFunction: | 270 // BrowsingDataRemoverFunction: |
| 271 virtual int GetRemovalMask() OVERRIDE; | 271 virtual int GetRemovalMask() OVERRIDE; |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 #endif // CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ | 274 #endif // CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ |
| OLD | NEW |