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

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: add new comment 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 determine whether we should initially enable an installed
551 // (or upgraded) extension. 551 // (or upgraded) extension. |disable_reason| will be ignored if NULL,
not at google - send to devlin 2014/11/12 18:02:15 This comment is misleading, it should mention that
binjin 2014/11/12 18:39:01 Done(editing the comments). Also this pointer is n
not at google - send to devlin 2014/11/12 19:35:17 It looks to me to be precisely the reason that thi
binjin 2014/11/13 12:03:31 I'm sorry, I think I didn't get your point. Do you
not at google - send to devlin 2014/11/13 17:41:21 No I mean that you should change the return type o
552 bool ShouldEnableOnInstall(const extensions::Extension* extension); 552 // otherwise contains why |extension| should not be enabled.
553 bool ShouldEnableOnInstall(
554 const extensions::Extension* extension,
555 extensions::Extension::DisableReason* disable_reason);
553 556
554 // Helper to determine if updating an extensions should proceed immediately, 557 // Helper to determine if updating an extensions should proceed immediately,
555 // or if we should delay the update until further notice. 558 // or if we should delay the update until further notice.
556 bool ShouldDelayExtensionUpdate(const std::string& extension_id, 559 bool ShouldDelayExtensionUpdate(const std::string& extension_id,
557 bool install_immediately) const; 560 bool install_immediately) const;
558 561
559 // Manages the blacklisted extensions, intended as callback from 562 // Manages the blacklisted extensions, intended as callback from
560 // Blacklist::GetBlacklistedIDs. 563 // Blacklist::GetBlacklistedIDs.
561 void ManageBlacklist( 564 void ManageBlacklist(
562 const extensions::Blacklist::BlacklistStateMap& blacklisted_ids); 565 const extensions::Blacklist::BlacklistStateMap& blacklisted_ids);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 731 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
729 WillNotLoadBlacklistedExtensionsFromDirectory); 732 WillNotLoadBlacklistedExtensionsFromDirectory);
730 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, ReloadBlacklistedExtension); 733 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, ReloadBlacklistedExtension);
731 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, BlacklistedInPrefsFromStartup); 734 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, BlacklistedInPrefsFromStartup);
732 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 735 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
733 GreylistedExtensionDisabled); 736 GreylistedExtensionDisabled);
734 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 737 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
735 GreylistDontEnableManuallyDisabled); 738 GreylistDontEnableManuallyDisabled);
736 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 739 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
737 GreylistUnknownDontChange); 740 GreylistUnknownDontChange);
741 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
742 ManagementPolicyProhibitsEnableOnInstalled);
738 743
739 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 744 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
740 }; 745 };
741 746
742 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 747 #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