| 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 <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // Disables the extension. If the extension is already disabled, just adds | 285 // Disables the extension. If the extension is already disabled, just adds |
| 286 // the |disable_reasons| (a bitmask of Extension::DisableReason - there can | 286 // the |disable_reasons| (a bitmask of Extension::DisableReason - there can |
| 287 // be multiple DisableReasons e.g. when an extension comes in disabled from | 287 // be multiple DisableReasons e.g. when an extension comes in disabled from |
| 288 // Sync). If the extension cannot be disabled (due to policy), does nothing. | 288 // Sync). If the extension cannot be disabled (due to policy), does nothing. |
| 289 virtual void DisableExtension(const std::string& extension_id, | 289 virtual void DisableExtension(const std::string& extension_id, |
| 290 int disable_reasons); | 290 int disable_reasons); |
| 291 | 291 |
| 292 // Disable non-default and non-managed extensions with ids not in | 292 // Disable non-default and non-managed extensions with ids not in |
| 293 // |except_ids|. Default extensions are those from the Web Store with | 293 // |except_ids|. Default extensions are those from the Web Store with |
| 294 // |was_installed_by_default| flag. | 294 // |was_installed_by_default| flag. |
| 295 void DisableUserExtensions(const std::vector<std::string>& except_ids); | 295 void DisableUserExtensionsExcept(const std::vector<std::string>& except_ids); |
| 296 | 296 |
| 297 // Puts all extensions in a blocked state: Unloading every extension, and | 297 // Puts all extensions in a blocked state: Unloading every extension, and |
| 298 // preventing them from ever loading until UnblockAllExtensions is called. | 298 // preventing them from ever loading until UnblockAllExtensions is called. |
| 299 // This state is stored in preferences, so persists until Chrome restarts. | 299 // This state is stored in preferences, so persists until Chrome restarts. |
| 300 // | 300 // |
| 301 // Component, external component and whitelisted policy installed extensions | 301 // Component, external component and whitelisted policy installed extensions |
| 302 // are exempt from being Blocked (see CanBlockExtension). | 302 // are exempt from being Blocked (see CanBlockExtension). |
| 303 void BlockAllExtensions(); | 303 void BlockAllExtensions(); |
| 304 | 304 |
| 305 // All blocked extensions are reverted to their previous state, and are | 305 // All blocked extensions are reverted to their previous state, and are |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 GreylistUnknownDontChange); | 753 GreylistUnknownDontChange); |
| 754 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 754 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 755 ManagementPolicyProhibitsEnableOnInstalled); | 755 ManagementPolicyProhibitsEnableOnInstalled); |
| 756 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 756 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 757 BlockAndUnblockBlacklistedExtension); | 757 BlockAndUnblockBlacklistedExtension); |
| 758 | 758 |
| 759 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 759 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 760 }; | 760 }; |
| 761 | 761 |
| 762 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 762 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |