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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // currently has any window showing. | 257 // currently has any window showing. |
258 // Allows noisy failures. | 258 // Allows noisy failures. |
259 void ReloadExtension(const std::string& extension_id); | 259 void ReloadExtension(const std::string& extension_id); |
260 | 260 |
261 // Suppresses noisy failures. | 261 // Suppresses noisy failures. |
262 void ReloadExtensionWithQuietFailure(const std::string& extension_id); | 262 void ReloadExtensionWithQuietFailure(const std::string& extension_id); |
263 | 263 |
264 // Uninstalls the specified extension. Callers should only call this method | 264 // Uninstalls the specified extension. Callers should only call this method |
265 // with extensions that exist. |reason| lets the caller specify why the | 265 // with extensions that exist. |reason| lets the caller specify why the |
266 // extension is uninstalled. | 266 // extension is uninstalled. |
| 267 // |
| 268 // If the return value is true, |deletion_done_callback| is invoked when data |
| 269 // deletion is done or at least is scheduled. |
267 virtual bool UninstallExtension(const std::string& extension_id, | 270 virtual bool UninstallExtension(const std::string& extension_id, |
268 extensions::UninstallReason reason, | 271 extensions::UninstallReason reason, |
| 272 const base::Closure& deletion_done_callback, |
269 base::string16* error); | 273 base::string16* error); |
270 | 274 |
271 // Enables the extension. If the extension is already enabled, does | 275 // Enables the extension. If the extension is already enabled, does |
272 // nothing. | 276 // nothing. |
273 virtual void EnableExtension(const std::string& extension_id); | 277 virtual void EnableExtension(const std::string& extension_id); |
274 | 278 |
275 // Disables the extension. If the extension is already disabled, or | 279 // Disables the extension. If the extension is already disabled, or |
276 // cannot be disabled, does nothing. | 280 // cannot be disabled, does nothing. |
277 virtual void DisableExtension( | 281 virtual void DisableExtension( |
278 const std::string& extension_id, | 282 const std::string& extension_id, |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 GreylistedExtensionDisabled); | 725 GreylistedExtensionDisabled); |
722 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 726 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
723 GreylistDontEnableManuallyDisabled); | 727 GreylistDontEnableManuallyDisabled); |
724 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
725 GreylistUnknownDontChange); | 729 GreylistUnknownDontChange); |
726 | 730 |
727 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 731 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
728 }; | 732 }; |
729 | 733 |
730 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 734 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |