diff options
Diffstat (limited to 'components/content_settings')
4 files changed, 21 insertions, 15 deletions
diff --git a/components/content_settings/core/browser/content_settings_default_provider.cc b/components/content_settings/core/browser/content_settings_default_provider.cc index 07adc4d..704e2fd 100644 --- a/components/content_settings/core/browser/content_settings_default_provider.cc +++ b/components/content_settings/core/browser/content_settings_default_provider.cc @@ -267,7 +267,7 @@ bool DefaultProvider::SetWebsiteSetting( NotifyObservers(ContentSettingsPattern(), ContentSettingsPattern(), content_type, - std::string()); + ResourceIdentifier()); return true; } @@ -423,7 +423,7 @@ void DefaultProvider::OnPreferenceChanged(const std::string& name) { NotifyObservers(ContentSettingsPattern(), ContentSettingsPattern(), content_type, - std::string()); + ResourceIdentifier()); } } diff --git a/components/content_settings/core/browser/content_settings_pref.cc b/components/content_settings/core/browser/content_settings_pref.cc index e18fa28..4c48da3 100644 --- a/components/content_settings/core/browser/content_settings_pref.cc +++ b/components/content_settings/core/browser/content_settings_pref.cc @@ -165,31 +165,33 @@ void ContentSettingsPref::ClearAllContentSettingsRules() { { base::AutoLock auto_lock(lock_); scoped_ptr<RuleIterator> rule_iterator( - map_to_modify->GetRuleIterator(content_type_, std::string(), NULL)); + map_to_modify->GetRuleIterator(content_type_, + ResourceIdentifier(), + NULL)); // Copy the rules; we cannot call |UpdatePref| while holding |lock_|. while (rule_iterator->HasNext()) rules_to_delete.push_back(rule_iterator->Next()); - map_to_modify->DeleteValues(content_type_, std::string()); + map_to_modify->DeleteValues(content_type_, ResourceIdentifier()); } for (std::vector<Rule>::const_iterator it = rules_to_delete.begin(); it != rules_to_delete.end(); ++it) { UpdatePref(it->primary_pattern, it->secondary_pattern, - std::string(), + ResourceIdentifier(), NULL); if (IsContentSettingsTypeSyncable(content_type_)) { UpdateOldPref(it->primary_pattern, it->secondary_pattern, - std::string(), + ResourceIdentifier(), NULL); } } notify_callback_.Run(ContentSettingsPattern(), ContentSettingsPattern(), content_type_, - std::string()); + ResourceIdentifier()); } void ContentSettingsPref::UpdateLastUsage( @@ -419,7 +421,7 @@ void ContentSettingsPref::OnPrefChanged() { notify_callback_.Run(ContentSettingsPattern(), ContentSettingsPattern(), content_type_, - std::string()); + ResourceIdentifier()); } void ContentSettingsPref::UpdatePref( diff --git a/components/content_settings/core/browser/content_settings_pref_provider.cc b/components/content_settings/core/browser/content_settings_pref_provider.cc index f53acc3..6f7c006 100644 --- a/components/content_settings/core/browser/content_settings_pref_provider.cc +++ b/components/content_settings/core/browser/content_settings_pref_provider.cc @@ -300,7 +300,7 @@ void PrefProvider::MigrateObsoleteMediaContentSetting() { std::vector<Rule> rules_to_delete; { scoped_ptr<RuleIterator> rule_iterator(GetRuleIterator( - CONTENT_SETTINGS_TYPE_MEDIASTREAM, std::string(), false)); + CONTENT_SETTINGS_TYPE_MEDIASTREAM, ResourceIdentifier(), false)); while (rule_iterator->HasNext()) { // Skip default setting and rules without a value. const content_settings::Rule& rule = rule_iterator->Next(); @@ -325,7 +325,7 @@ void PrefProvider::MigrateObsoleteMediaContentSetting() { SetWebsiteSetting(it->primary_pattern, it->secondary_pattern, CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, - std::string(), + ResourceIdentifier(), new base::FundamentalValue(CONTENT_SETTING_ALLOW)); } // Add the exception to the new camera content setting. @@ -333,7 +333,7 @@ void PrefProvider::MigrateObsoleteMediaContentSetting() { SetWebsiteSetting(it->primary_pattern, it->secondary_pattern, CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, - std::string(), + ResourceIdentifier(), new base::FundamentalValue(CONTENT_SETTING_ALLOW)); } @@ -341,7 +341,7 @@ void PrefProvider::MigrateObsoleteMediaContentSetting() { SetWebsiteSetting(it->primary_pattern, it->secondary_pattern, CONTENT_SETTINGS_TYPE_MEDIASTREAM, - std::string(), + ResourceIdentifier(), NULL); } } diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc index a67bb7d..2c774fb 100644 --- a/components/content_settings/core/browser/content_settings_utils.cc +++ b/components/content_settings/core/browser/content_settings_utils.cc @@ -91,7 +91,7 @@ std::string ContentSettingToString(ContentSetting setting) { NOTREACHED(); } - return std::string(); + return ResourceIdentifier(); } ContentSetting ContentSettingFromString(const std::string& name) { @@ -229,9 +229,13 @@ base::Value* GetContentSettingValueAndPatterns( void GetRendererContentSettingRules(const HostContentSettingsMap* map, RendererContentSettingRules* rules) { map->GetSettingsForOneType( - CONTENT_SETTINGS_TYPE_IMAGES, std::string(), &(rules->image_rules)); + CONTENT_SETTINGS_TYPE_IMAGES, + ResourceIdentifier(), + &(rules->image_rules)); map->GetSettingsForOneType( - CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(), &(rules->script_rules)); + CONTENT_SETTINGS_TYPE_JAVASCRIPT, + ResourceIdentifier(), + &(rules->script_rules)); } } // namespace content_settings |