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

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

Issue 8538004: Take script URLs into account when applying script content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 9 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
Index: chrome/browser/content_settings/host_content_settings_map.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc
index b0baa0425bf6024d7d1ca7959f192a8d9a8dfac3..2c09ad2d3bab9c55f11107c064701faa037cf54c 100644
--- a/chrome/browser/content_settings/host_content_settings_map.cc
+++ b/chrome/browser/content_settings/host_content_settings_map.cc
@@ -163,16 +163,6 @@ ContentSetting HostContentSettingsMap::GetDefaultContentSetting(
return CONTENT_SETTING_DEFAULT;
}
-ContentSettings HostContentSettingsMap::GetDefaultContentSettings() const {
- ContentSettings output(CONTENT_SETTING_DEFAULT);
- for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) {
- if (!ContentTypeHasCompoundValue(ContentSettingsType(i)))
- output.settings[i] = GetDefaultContentSetting(ContentSettingsType(i),
- NULL);
- }
- return output;
-}
-
ContentSetting HostContentSettingsMap::GetContentSetting(
const GURL& primary_url,
const GURL& secondary_url,
@@ -183,23 +173,6 @@ ContentSetting HostContentSettingsMap::GetContentSetting(
return content_settings::ValueToContentSetting(value.get());
}
-ContentSettings HostContentSettingsMap::GetContentSettings(
- const GURL& primary_url) const {
- ContentSettings output;
- // If we require a resource identifier, set the content settings to default,
- // otherwise make the defaults explicit. Values for content type
- // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE can't be mapped to the type
- // |ContentSetting|. So we ignore them here.
- for (int j = 0; j < CONTENT_SETTINGS_NUM_TYPES; ++j) {
- ContentSettingsType type = ContentSettingsType(j);
- if (!ContentTypeHasCompoundValue(type)) {
- output.settings[j] = GetContentSetting(
- primary_url, primary_url, ContentSettingsType(j), std::string());
- }
- }
- return output;
-}
-
void HostContentSettingsMap::GetSettingsForOneType(
ContentSettingsType content_type,
const std::string& resource_identifier,

Powered by Google App Engine
This is Rietveld 408576698