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

Unified Diff: chrome/browser/content_settings/host_content_settings_map.h

Issue 8334020: Check for default content setting pattern when requiring user authorization for plug-ins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 2 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/browser/content_settings/host_content_settings_map.h
diff --git a/chrome/browser/content_settings/host_content_settings_map.h b/chrome/browser/content_settings/host_content_settings_map.h
index e6831a1a7a62604ff5740aad09a038e8f42ddf76..540d9878fbd0128de93fbc33d8efb853aa6e3a26 100644
--- a/chrome/browser/content_settings/host_content_settings_map.h
+++ b/chrome/browser/content_settings/host_content_settings_map.h
@@ -75,28 +75,34 @@ class HostContentSettingsMap
// This may be called on any thread.
ContentSettings GetDefaultContentSettings() const;
- // Returns a single ContentSetting which applies to the given URLs. Note that
- // certain internal schemes are whitelisted. For ContentSettingsTypes that
- // require a resource identifier to be specified, the |resource_identifier|
- // must be non-empty.
- //
- // This may be called on any thread.
+ // Returns a single |ContentSetting| which applies to the given URLs.
+ // Note that certain internal schemes are whitelisted.
+ // For |CONTENT_TYPE_COOKIES|, |GetCookieContentSetting| should be called,
+ // and for content types that can't be converted to a ContentSetting,
+ // |GetContentSettingValue| should be called.
+ // If there is no content setting, returns CONTENT_SETTING_DEFAULT.
+ // May be called on any thread.
ContentSetting GetContentSetting(
const GURL& primary_url,
const GURL& secondary_url,
ContentSettingsType content_type,
const std::string& resource_identifier) const;
- // Returns a content setting |Value| which applies to the given URLs. Note
- // that certain internal schemes are whitelisted. Ownership of the returned
- // |Value| is transfered to the caller.
- //
- // This may be called on any thread.
+ // Returns a single content setting |Value| which applies to the given URLs.
+ // If |primary_pattern| and |secondary_pattern| are not NULL, they are set to
+ // the patterns of the applying rule.
+ // Note that certain internal schemes are whitelisted.
+ // If there is no content setting, returns NULL and leaves |primary_pattern|
+ // and |secondary_pattern| unchanged.
+ // Otherwise transfers ownership of the resulting |Value| to the caller.
+ // May be called on any thread.
base::Value* GetContentSettingValue(
const GURL& primary_url,
const GURL& secondary_url,
ContentSettingsType content_type,
- const std::string& resource_identifier) const;
+ const std::string& resource_identifier,
+ ContentSettingsPattern* primary_pattern,
+ ContentSettingsPattern* secondary_pattern) const;
// Gets the content setting for cookies. This takes the third party cookie
// flag into account, and therefore needs to know whether we read or write a

Powered by Google App Engine
This is Rietveld 408576698