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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 556adb0025afdec9c42b162005a9cf4879179df8..0f54b6124bae87c0d84fac97d087244381c69fb2 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -548,8 +548,11 @@ class ExtensionService
void UpdateActiveExtensionsInCrashReporter();
// Helper to determine whether we should initially enable an installed
- // (or upgraded) extension.
- bool ShouldEnableOnInstall(const extensions::Extension* extension);
+ // (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
+ // otherwise contains why |extension| should not be enabled.
+ bool ShouldEnableOnInstall(
+ const extensions::Extension* extension,
+ extensions::Extension::DisableReason* disable_reason);
// Helper to determine if updating an extensions should proceed immediately,
// or if we should delay the update until further notice.
@@ -735,6 +738,8 @@ class ExtensionService
GreylistDontEnableManuallyDisabled);
FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
GreylistUnknownDontChange);
+ FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
+ ManagementPolicyProhibitsEnableOnInstalled);
DISALLOW_COPY_AND_ASSIGN(ExtensionService);
};
« 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