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

Unified Diff: chrome/browser/permissions/chooser_context_base.h

Issue 1427433017: Add a "guard" content settings type for chooser permissions. Base URL: https://chromium.googlesource.com/chromium/src.git@permission_store
Patch Set: Created 5 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
« no previous file with comments | « no previous file | chrome/browser/permissions/chooser_context_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/chooser_context_base.h
diff --git a/chrome/browser/permissions/chooser_context_base.h b/chrome/browser/permissions/chooser_context_base.h
index 8cf1e614975324a5c4477b11479c741b762f1f41..d7f231d435acd6f48508de24c0bc599b5553920f 100644
--- a/chrome/browser/permissions/chooser_context_base.h
+++ b/chrome/browser/permissions/chooser_context_base.h
@@ -27,9 +27,17 @@ class Profile;
class ChooserContextBase : public KeyedService {
public:
ChooserContextBase(Profile* profile,
+ ContentSettingsType guard_content_settings_type,
ContentSettingsType data_content_settings_type);
~ChooserContextBase() override;
+ // Checks whether |requesting_origin| can request permission to access objects
+ // when embedded within |embedding_origin|. This is done by checking
+ // |guard_content_settings_type_| which will usually be allowed by default but
+ // could be overridden by group policy.
+ bool CanRequestObjectPermission(const GURL& requesting_origin,
+ const GURL& embedding_origin);
+
// Returns the list of objects that |requesting_origin| has been granted
// permission to access when embedded within |embedding_origin|.
ScopedVector<base::DictionaryValue> GetGrantedObjects(
@@ -61,6 +69,7 @@ class ChooserContextBase : public KeyedService {
scoped_ptr<base::Value> value);
HostContentSettingsMap* const host_content_settings_map_;
+ const ContentSettingsType guard_content_settings_type_;
const ContentSettingsType data_content_settings_type_;
};
« no previous file with comments | « no previous file | chrome/browser/permissions/chooser_context_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698