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

Unified Diff: chrome/common/extensions/extension.cc

Issue 9222013: Prevent unnecessary prompts when unpacked extensions use chrome.permissions.request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 months 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/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 8a4ec531764e80d0da80030d6bc0b506870ef537..d8736e8d5c114b0d220185e5ace69a6f321fb899 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -2659,10 +2659,16 @@ bool Extension::ParsePermissions(const extensions::Manifest* source,
return true;
}
-bool Extension::CanSilentlyIncreasePermissions() const {
+bool Extension::CanSilentlyIncreasePermissionsDuringInstall() const {
+ if (location() == LOAD && !plugins().empty())
+ return false;
return location() != INTERNAL;
}
+bool Extension::CanSilentlyIncreasePermissionsWhileRunning() const {
+ return location() != INTERNAL && location() != LOAD;
+}
+
bool Extension::CanSpecifyHostPermission(const URLPattern& pattern,
const ExtensionAPIPermissionSet& permissions) const {
if (!pattern.match_all_urls() &&

Powered by Google App Engine
This is Rietveld 408576698