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

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

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.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 97b7930427b0a6fbe46d2cb351f3098dd73a2841..aad4db6610afeb56c1e484ce29f6b05982666682 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -396,10 +396,12 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
const URLPatternSet& GetEffectiveHostPermissions() const;
// Returns true if the extension can silently increase its permission level.
- // Extensions that can silently increase permissions are installed through
- // mechanisms that are implicitly trusted.
- bool CanSilentlyIncreasePermissions() const;
-
+ // We distinguish between install/upgrade and runtime to simplify extension
+ // development. We prompt at install time for packaged extensions and unpacked
Yoyo Zhou 2012/01/24 19:42:23 packaged -> packed
+ // extensions that contain plugins. We prompt for both types of extensions
+ // when they request permissions with the permissions API.
+ bool CanSilentlyIncreasePermissionsDuringInstall() const;
+ bool CanSilentlyIncreasePermissionsWhileRunning() const;
jstritar 2012/01/24 17:54:44 Are these methods confusing?
Yoyo Zhou 2012/01/24 19:42:23 Maybe "upgrade" instead of "install"? (Does it mak
jstritar 2012/01/25 17:34:18 I ended up going back to just one CanSilentlyIncre
// Whether the extension has access to the given URL.
bool HasHostPermission(const GURL& url) const;

Powered by Google App Engine
This is Rietveld 408576698