| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Returns whether or not removal mask retrieval was successful. | 103 // Returns whether or not removal mask retrieval was successful. |
| 104 // |removal_mask| is populated with the result, if successful. | 104 // |removal_mask| is populated with the result, if successful. |
| 105 virtual bool GetRemovalMask(int* removal_mask) = 0; | 105 virtual bool GetRemovalMask(int* removal_mask) = 0; |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 // Updates the removal bitmask according to whether removing plugin data is | 108 // Updates the removal bitmask according to whether removing plugin data is |
| 109 // supported or not. | 109 // supported or not. |
| 110 void CheckRemovingPluginDataSupported( | 110 void CheckRemovingPluginDataSupported( |
| 111 scoped_refptr<PluginPrefs> plugin_prefs); | 111 scoped_refptr<PluginPrefs> plugin_prefs); |
| 112 | 112 |
| 113 // Parse the developer-provided |origin_types| object into an origin_type_mask | 113 // Parse the developer-provided |origin_types| object into |origin_type_mask| |
| 114 // that can be used with the BrowsingDataRemover. | 114 // that can be used with the BrowsingDataRemover. |
| 115 int ParseOriginTypeMask(const base::DictionaryValue& options); | 115 // Returns true if parsing was successful. |
| 116 bool ParseOriginTypeMask(const base::DictionaryValue& options, |
| 117 int* origin_type_mask); |
| 116 | 118 |
| 117 // Called when we're ready to start removing data. | 119 // Called when we're ready to start removing data. |
| 118 void StartRemoving(); | 120 void StartRemoving(); |
| 119 | 121 |
| 120 base::Time remove_since_; | 122 base::Time remove_since_; |
| 121 int removal_mask_; | 123 int removal_mask_; |
| 122 int origin_type_mask_; | 124 int origin_type_mask_; |
| 123 ScopedObserver<BrowsingDataRemover, BrowsingDataRemover::Observer> observer_; | 125 ScopedObserver<BrowsingDataRemover, BrowsingDataRemover::Observer> observer_; |
| 124 }; | 126 }; |
| 125 | 127 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 BROWSINGDATA_REMOVEWEBSQL) | 303 BROWSINGDATA_REMOVEWEBSQL) |
| 302 | 304 |
| 303 protected: | 305 protected: |
| 304 ~BrowsingDataRemoveWebSQLFunction() override {} | 306 ~BrowsingDataRemoveWebSQLFunction() override {} |
| 305 | 307 |
| 306 // BrowsingDataRemoverFunction: | 308 // BrowsingDataRemoverFunction: |
| 307 bool GetRemovalMask(int* removal_mask) override; | 309 bool GetRemovalMask(int* removal_mask) override; |
| 308 }; | 310 }; |
| 309 | 311 |
| 310 #endif // CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ | 312 #endif // CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ |
| OLD | NEW |