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