Chromium Code Reviews| Index: chrome/browser/content_settings/content_settings_pref_provider.cc |
| diff --git a/chrome/browser/content_settings/content_settings_pref_provider.cc b/chrome/browser/content_settings/content_settings_pref_provider.cc |
| index d185dcddf73b178e5a3a794706c5a39e125fff24..6be39866aacb4a61f1fbddf59b9abfd363fd9c44 100644 |
| --- a/chrome/browser/content_settings/content_settings_pref_provider.cc |
| +++ b/chrome/browser/content_settings/content_settings_pref_provider.cc |
| @@ -361,17 +361,39 @@ void PrefProvider::ReadContentSettingsFromPref(bool overwrite) { |
| } |
| } |
| } |
| - int setting = CONTENT_SETTING_DEFAULT; |
| - if (settings_dictionary->GetIntegerWithoutPathExpansion( |
| - GetTypeName(ContentSettingsType(i)), &setting)) { |
| - DCHECK_NE(CONTENT_SETTING_DEFAULT, setting); |
| - setting = FixObsoleteCookiePromptMode(content_type, |
| - ContentSetting(setting)); |
| - value_map_.SetValue(pattern_pair.first, |
| - pattern_pair.second, |
| - content_type, |
| - ResourceIdentifier(""), |
| - Value::CreateIntegerValue(setting)); |
| + if (content_type == CONTENT_SETTINGS_TYPE_MEDIASTREAM) { |
|
Bernhard Bauer
2012/06/18 17:38:15
Hm. I think we should make the ContentTypeHasCompo
no longer working on chromium
2012/06/19 12:23:17
I make the ContentTypeHasCompoundValue() a static
Bernhard Bauer
2012/06/19 14:33:35
Right, but it's only unexpected to a client that u
|
| + // MediaStream is using compound type as value. |
| + Value* value; |
| + if (settings_dictionary->GetWithoutPathExpansion( |
| + GetTypeName(ContentSettingsType(i)), &value)) { |
| + if (value->IsType(Value::TYPE_DICTIONARY)) { |
| + DictionaryValue* setting = NULL; |
| + if (settings_dictionary->GetDictionaryWithoutPathExpansion( |
| + GetTypeName(ContentSettingsType(i)), &setting)) { |
| + DCHECK(!setting->empty()); |
| + value_map_.SetValue(pattern_pair.first, |
| + pattern_pair.second, |
| + content_type, |
| + ResourceIdentifier(""), |
| + setting->DeepCopy()); |
| + } else { |
| + NOTREACHED(); |
| + } |
| + } |
| + } |
| + } else { |
| + int setting = CONTENT_SETTING_DEFAULT; |
| + if (settings_dictionary->GetIntegerWithoutPathExpansion( |
| + GetTypeName(ContentSettingsType(i)), &setting)) { |
| + DCHECK_NE(CONTENT_SETTING_DEFAULT, setting); |
| + setting = FixObsoleteCookiePromptMode(content_type, |
| + ContentSetting(setting)); |
| + value_map_.SetValue(pattern_pair.first, |
| + pattern_pair.second, |
| + content_type, |
| + ResourceIdentifier(""), |
| + Value::CreateIntegerValue(setting)); |
| + } |
| } |
| } |
| } |