Chromium Code Reviews| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 272 // deletion is done or at least is scheduled. | 272 // deletion is done or at least is scheduled. |
| 273 virtual bool UninstallExtension(const std::string& extension_id, | 273 virtual bool UninstallExtension(const std::string& extension_id, |
| 274 extensions::UninstallReason reason, | 274 extensions::UninstallReason reason, |
| 275 const base::Closure& deletion_done_callback, | 275 const base::Closure& deletion_done_callback, |
| 276 base::string16* error); | 276 base::string16* error); |
| 277 | 277 |
| 278 // Enables the extension. If the extension is already enabled, does | 278 // Enables the extension. If the extension is already enabled, does |
| 279 // nothing. | 279 // nothing. |
| 280 virtual void EnableExtension(const std::string& extension_id); | 280 virtual void EnableExtension(const std::string& extension_id); |
| 281 | 281 |
| 282 // Disables the extension. If the extension is already disabled, or | 282 // Disables the extension. If the extension is already disabled, just adds |
| 283 // cannot be disabled, does nothing. | 283 // the |disable_reasons|. If the extension cannot be disabled (due to policy), |
| 284 // does nothing. | |
| 285 // Note that |disable_reasons| may be a bitmask of multiple reasons. | |
|
not at google - send to devlin
2015/05/12 18:04:17
Could you change the argument to be an int? Bitmas
Marc Treib
2015/05/19 12:12:03
Done.
not at google - send to devlin
2015/05/19 14:32:10
Thanks. One last request: add a quick note how mul
Marc Treib
2015/05/19 15:30:55
Done.
| |
| 284 virtual void DisableExtension( | 286 virtual void DisableExtension( |
| 285 const std::string& extension_id, | 287 const std::string& extension_id, |
| 286 extensions::Extension::DisableReason disable_reason); | 288 extensions::Extension::DisableReason disable_reasons); |
| 287 | 289 |
| 288 // Disable non-default and non-managed extensions with ids not in | 290 // Disable non-default and non-managed extensions with ids not in |
| 289 // |except_ids|. Default extensions are those from the Web Store with | 291 // |except_ids|. Default extensions are those from the Web Store with |
| 290 // |was_installed_by_default| flag. | 292 // |was_installed_by_default| flag. |
| 291 void DisableUserExtensions(const std::vector<std::string>& except_ids); | 293 void DisableUserExtensions(const std::vector<std::string>& except_ids); |
| 292 | 294 |
| 293 // Puts all extensions in a blocked state: Unloading every extension, and | 295 // Puts all extensions in a blocked state: Unloading every extension, and |
| 294 // preventing them from ever loading until UnblockAllExtensions is called. | 296 // preventing them from ever loading until UnblockAllExtensions is called. |
| 295 // This state is stored in preferences, so persists until Chrome restarts. | 297 // This state is stored in preferences, so persists until Chrome restarts. |
| 296 // | 298 // |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 763 GreylistUnknownDontChange); | 765 GreylistUnknownDontChange); |
| 764 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 766 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 765 ManagementPolicyProhibitsEnableOnInstalled); | 767 ManagementPolicyProhibitsEnableOnInstalled); |
| 766 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 768 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 767 BlockAndUnblockBlacklistedExtension); | 769 BlockAndUnblockBlacklistedExtension); |
| 768 | 770 |
| 769 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 771 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 770 }; | 772 }; |
| 771 | 773 |
| 772 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 774 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |