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

Unified Diff: extensions/browser/extension_prefs.h

Issue 396033002: Support "always allow" for runtime script execution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Discriminate between explicit and scriptable hosts, other minor changes Created 6 years, 5 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: extensions/browser/extension_prefs.h
diff --git a/extensions/browser/extension_prefs.h b/extensions/browser/extension_prefs.h
index fcb6882318fc71d5433f091f95b208742eb580fa..8c7e4c7261513da3c7a14971024815a89f5595a1 100644
--- a/extensions/browser/extension_prefs.h
+++ b/extensions/browser/extension_prefs.h
@@ -400,6 +400,19 @@ class ExtensionPrefs : public ExtensionScopedPrefs, public KeyedService {
void SetActivePermissions(const std::string& extension_id,
const PermissionSet* permissions);
+ // Returns the persisted permission set for the extension with
+ // |extension_id|, and NULL if no preferences were found. This passes
+ // ownership of the returned set to the caller.
+ PermissionSet* GetPersistedPermissions(const std::string& extension_id);
not at google - send to devlin 2014/08/01 18:15:12 I'm not sure whether this needs to be a whole sepa
gpdavis 2014/08/01 20:06:06 But permissions from the manifest are added direct
not at google - send to devlin 2014/08/04 23:53:13 Ah - so there is a concept of "active permissions"
+
+ // Adds |permissions| to |extension|'s persisted permissions for script
+ // injection requests.
+ void AddPersistedPermission(const std::string& extension_id,
+ const PermissionSet* permissions);
+
+ // Clears |extension|'s persisted permissions for script injection requests.
+ void ClearPersistedPermissions(const std::string& extension_id);
+
// Records whether or not this extension is currently running.
void SetExtensionRunning(const std::string& extension_id, bool is_running);

Powered by Google App Engine
This is Rietveld 408576698