Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 714133002: Add more management policy checking after extension installed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove two tests Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 reasons 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 int GetDisableReasonsOnInstalled(const extensions::Extension* extension);
547 548
548 // Helper to determine if updating an extensions should proceed immediately, 549 // Helper to determine if updating an extensions should proceed immediately,
549 // or if we should delay the update until further notice. 550 // or if we should delay the update until further notice.
550 bool ShouldDelayExtensionUpdate(const std::string& extension_id, 551 bool ShouldDelayExtensionUpdate(const std::string& extension_id,
551 bool install_immediately) const; 552 bool install_immediately) const;
552 553
553 // Manages the blacklisted extensions, intended as callback from 554 // Manages the blacklisted extensions, intended as callback from
554 // Blacklist::GetBlacklistedIDs. 555 // Blacklist::GetBlacklistedIDs.
555 void ManageBlacklist( 556 void ManageBlacklist(
556 const extensions::Blacklist::BlacklistStateMap& blacklisted_ids); 557 const extensions::Blacklist::BlacklistStateMap& blacklisted_ids);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 723 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
723 WillNotLoadBlacklistedExtensionsFromDirectory); 724 WillNotLoadBlacklistedExtensionsFromDirectory);
724 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, ReloadBlacklistedExtension); 725 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, ReloadBlacklistedExtension);
725 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, BlacklistedInPrefsFromStartup); 726 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, BlacklistedInPrefsFromStartup);
726 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 727 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
727 GreylistedExtensionDisabled); 728 GreylistedExtensionDisabled);
728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 729 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
729 GreylistDontEnableManuallyDisabled); 730 GreylistDontEnableManuallyDisabled);
730 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 731 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
731 GreylistUnknownDontChange); 732 GreylistUnknownDontChange);
733 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
734 ManagementPolicyProhibitsEnableOnInstalled);
732 735
733 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 736 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
734 }; 737 };
735 738
736 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 739 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_disabled_ui_browsertest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698