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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 bool was_ephemeral); | 540 bool was_ephemeral); |
541 | 541 |
542 // Disables the extension if the privilege level has increased | 542 // Disables the extension if the privilege level has increased |
543 // (e.g., due to an upgrade). | 543 // (e.g., due to an upgrade). |
544 void CheckPermissionsIncrease(const extensions::Extension* extension, | 544 void CheckPermissionsIncrease(const extensions::Extension* extension, |
545 bool is_extension_installed); | 545 bool is_extension_installed); |
546 | 546 |
547 // Helper that updates the active extension list used for crash reporting. | 547 // Helper that updates the active extension list used for crash reporting. |
548 void UpdateActiveExtensionsInCrashReporter(); | 548 void UpdateActiveExtensionsInCrashReporter(); |
549 | 549 |
550 // Helper to determine whether we should initially enable an installed | 550 // Helper to get the disable reason for an installed (or upgraded) extension. |
551 // (or upgraded) extension. | 551 // A return value of Extension::DISABLE_NONE indicates that we should enable |
552 bool ShouldEnableOnInstall(const extensions::Extension* extension); | 552 // this extension initially. |
| 553 extensions::Extension::DisableReason GetDisableReasonOnInstalled( |
| 554 const extensions::Extension* extension); |
553 | 555 |
554 // Helper to determine if updating an extensions should proceed immediately, | 556 // Helper to determine if updating an extensions should proceed immediately, |
555 // or if we should delay the update until further notice. | 557 // or if we should delay the update until further notice. |
556 bool ShouldDelayExtensionUpdate(const std::string& extension_id, | 558 bool ShouldDelayExtensionUpdate(const std::string& extension_id, |
557 bool install_immediately) const; | 559 bool install_immediately) const; |
558 | 560 |
559 // Manages the blacklisted extensions, intended as callback from | 561 // Manages the blacklisted extensions, intended as callback from |
560 // Blacklist::GetBlacklistedIDs. | 562 // Blacklist::GetBlacklistedIDs. |
561 void ManageBlacklist( | 563 void ManageBlacklist( |
562 const extensions::Blacklist::BlacklistStateMap& blacklisted_ids); | 564 const extensions::Blacklist::BlacklistStateMap& blacklisted_ids); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 730 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
729 WillNotLoadBlacklistedExtensionsFromDirectory); | 731 WillNotLoadBlacklistedExtensionsFromDirectory); |
730 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, ReloadBlacklistedExtension); | 732 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, ReloadBlacklistedExtension); |
731 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, BlacklistedInPrefsFromStartup); | 733 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, BlacklistedInPrefsFromStartup); |
732 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 734 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
733 GreylistedExtensionDisabled); | 735 GreylistedExtensionDisabled); |
734 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 736 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
735 GreylistDontEnableManuallyDisabled); | 737 GreylistDontEnableManuallyDisabled); |
736 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 738 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
737 GreylistUnknownDontChange); | 739 GreylistUnknownDontChange); |
| 740 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 741 ManagementPolicyProhibitsEnableOnInstalled); |
738 | 742 |
739 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 743 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
740 }; | 744 }; |
741 | 745 |
742 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 746 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |