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_ |
11 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_ | 11 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_ |
12 #pragma once | 12 #pragma once |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "chrome/browser/browsing_data_remover.h" | 16 #include "chrome/browser/browsing_data_remover.h" |
17 #include "chrome/browser/extensions/extension_function.h" | 17 #include "chrome/browser/extensions/extension_function.h" |
18 | 18 |
19 namespace base { | |
20 class DictionaryValue; | |
21 } | |
22 | |
23 class PluginPrefs; | 19 class PluginPrefs; |
24 | 20 |
25 // This serves as a base class from which the browsing data API functions will | 21 // This serves as a base class from which the browsing data API functions will |
26 // inherit. Each needs to be an observer of BrowsingDataRemover events, and each | 22 // inherit. Each needs to be an observer of BrowsingDataRemover events, and each |
27 // will handle those events in the same way (by calling the passed-in callback | 23 // will handle those events in the same way (by calling the passed-in callback |
28 // function). | 24 // function). |
29 // | 25 // |
30 // Each child class must implement GetRemovalMask(), which returns the bitmask | 26 // Each child class must implement GetRemovalMask(), which returns the bitmask |
31 // of data types to remove. | 27 // of data types to remove. |
32 class BrowsingDataExtensionFunction : public AsyncExtensionFunction, | 28 class BrowsingDataExtensionFunction : public AsyncExtensionFunction, |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 virtual ~ClearPasswordsFunction() {} | 129 virtual ~ClearPasswordsFunction() {} |
134 | 130 |
135 protected: | 131 protected: |
136 // BrowsingDataTypeExtensionFunction interface method. | 132 // BrowsingDataTypeExtensionFunction interface method. |
137 virtual int GetRemovalMask() const OVERRIDE; | 133 virtual int GetRemovalMask() const OVERRIDE; |
138 | 134 |
139 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.passwords") | 135 DECLARE_EXTENSION_FUNCTION_NAME("experimental.clear.passwords") |
140 }; | 136 }; |
141 | 137 |
142 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_ | 138 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CLEAR_API_H_ |
OLD | NEW |