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

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: fixes addressing #19 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | chrome/browser/extensions/extension_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698