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

Unified Diff: chrome/browser/extensions/extension_management.h

Issue 2499493004: Communicate ExtensionSettings policy to renderers (Closed)
Patch Set: URLPatternSets use shared memory for IPC. Default scope patterns sent once per renderer. Created 4 years 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_management.h
diff --git a/chrome/browser/extensions/extension_management.h b/chrome/browser/extensions/extension_management.h
index 8ce74feff42f9522751586d1fd41ce7fa7e3bcd7..1fec98d49486d2e9d1af6cc8b9b7cae773af1563 100644
--- a/chrome/browser/extensions/extension_management.h
+++ b/chrome/browser/extensions/extension_management.h
@@ -117,9 +117,26 @@ class ExtensionManagement : public KeyedService {
// Returns the list of hosts blocked by policy for |extension|.
const URLPatternSet& GetRuntimeBlockedHosts(const Extension* extension) const;
- // Returns the list of hosts |extension| is limited to by policy.
+ // Returns the hosts exempted by policy from the RuntimeBlockedHosts for
+ // |extension|.
const URLPatternSet& GetRuntimeAllowedHosts(const Extension* extension) const;
+ // Returns the list of hosts blocked by policy for Default scope. This can be
+ // overridden by an invividual scope which is queried via
+ // GetRuntimeBlockedHosts.
+ const URLPatternSet& GetDefaultRuntimeBlockedHosts() const;
+
+ // Returns the hosts exempted by policy from RuntimeBlockedHosts for
+ // the default scope. This can be overridden by an individual scope which is
+ // queries via GetRuntimeAllowedHosts.
+ const URLPatternSet& GetDefaultRuntimeAllowedHosts() const;
+
+ // Checks if an |extension| has its own runtime_blocked_hosts or
+ // runtime_allowed_hosts defined in the individual scope of the
+ // ExtensionSettings policy.
+ // Returns false if an individual scoped setting isn't defined.
+ bool IsDefaultRuntimeBlockedAllowedHosts(const Extension* extension) const;
+
// Checks if a URL is on the blocked host permissions list for a specific
// extension.
bool IsBlockedHost(const Extension* extension, const GURL& url) const;

Powered by Google App Engine
This is Rietveld 408576698