Chromium Code Reviews| Index: components/content_settings/core/browser/host_content_settings_map.h |
| diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h |
| index 98fe724f79dc75b7aa9aebc0b87c4d8e0ebe80cc..b551d462dbb77c87a4ebbfadc53591985e59abe2 100644 |
| --- a/components/content_settings/core/browser/host_content_settings_map.h |
| +++ b/components/content_settings/core/browser/host_content_settings_map.h |
| @@ -140,14 +140,35 @@ class HostContentSettingsMap : public content_settings::Observer, |
| // data types please use the method SetWebsiteSettingDefaultScope(). |
| // |
| // This should only be called on the UI thread. |
| - // TODO(raymes): Create a version of this function which uses the default |
| - // scope. |
| + // Unless adding a custom-scoped setting, most developers will want to use |
| + // SetWebsiteSettingDefaultScope() instead. |
|
raymes
2016/03/02 04:22:51
nit: Perhaps move this up to line 137 after the pr
raymes
2016/03/02 04:22:51
nit: SetWebsiteSettingDefaultScope
lshang
2016/03/02 05:21:56
Done.
|
| void SetContentSetting(const ContentSettingsPattern& primary_pattern, |
| const ContentSettingsPattern& secondary_pattern, |
| ContentSettingsType content_type, |
| const std::string& resource_identifier, |
| ContentSetting setting); |
| + // Sets the content |setting| for the default scope of the url that is |
| + // appropriate for the given |content_type| and |resource_identifier|. |
| + // Setting the value to CONTENT_SETTING_DEFAULT causes the default setting |
| + // for that type to be used. |
| + // |
| + // NOTICE: This is just a convenience method for content types that use |
| + // |CONTENT_SETTING| as their data type. For content types that use other |
| + // data types please use the method SetWebsiteSettingDefaultScope(). |
| + // |
| + // This should only be called on the UI thread. |
| + // |
| + // Internally this will call SetContentSetting() with the default scope |
| + // patterns for the given |content_type|. Developers will generally want |
| + // to use this function instead of SetContentSetting() unless they need |
| + // to specify custom scoping. |
| + void SetContentSettingDefaultScope(const GURL& primary_url, |
| + const GURL& secondary_url, |
| + ContentSettingsType content_type, |
| + const std::string& resource_identifier, |
| + ContentSetting setting); |
| + |
| // Sets the |value| for the default scope of the url that is appropriate for |
| // the given |content_type| and |resource_identifier|. Setting the value to |
| // null removes the default pattern pair for this content type. |