| Index: components/content_settings/core/browser/content_settings_pref.cc
|
| diff --git a/components/content_settings/core/browser/content_settings_pref.cc b/components/content_settings/core/browser/content_settings_pref.cc
|
| index 2443e274884a5d20d0885f4c553dc5730dceb2e9..7cf4a3287cf2c6d3fda6e58d3628364e4746c6e8 100644
|
| --- a/components/content_settings/core/browser/content_settings_pref.cc
|
| +++ b/components/content_settings/core/browser/content_settings_pref.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/prefs/scoped_user_pref_update.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/time/clock.h"
|
| +#include "components/content_settings/core/browser/content_settings_registry.h"
|
| #include "components/content_settings/core/browser/content_settings_rule.h"
|
| #include "components/content_settings/core/browser/content_settings_utils.h"
|
| #include "components/content_settings/core/browser/host_content_settings_map.h"
|
| @@ -308,15 +309,7 @@ void ContentSettingsPref::ReadContentSettingsFromPref() {
|
| }
|
| }
|
| base::Value* value = NULL;
|
| - if (HostContentSettingsMap::ContentTypeHasCompoundValue(content_type_)) {
|
| - const base::DictionaryValue* setting = NULL;
|
| - // TODO(xians): Handle the non-dictionary types.
|
| - if (settings_dictionary->GetDictionaryWithoutPathExpansion(
|
| - kSettingPath, &setting)) {
|
| - DCHECK(!setting->empty());
|
| - value = setting->DeepCopy();
|
| - }
|
| - } else {
|
| + if (ContentSettingsRegistry::GetInstance()->Get(content_type_)) {
|
| int setting = CONTENT_SETTING_DEFAULT;
|
| if (settings_dictionary->GetIntegerWithoutPathExpansion(
|
| kSettingPath, &setting)) {
|
| @@ -325,6 +318,14 @@ void ContentSettingsPref::ReadContentSettingsFromPref() {
|
| ContentSetting(setting));
|
| value = new base::FundamentalValue(setting);
|
| }
|
| + } else {
|
| + const base::DictionaryValue* setting = NULL;
|
| + // TODO(xians): Handle the non-dictionary types.
|
| + if (settings_dictionary->GetDictionaryWithoutPathExpansion(kSettingPath,
|
| + &setting)) {
|
| + DCHECK(!setting->empty());
|
| + value = setting->DeepCopy();
|
| + }
|
| }
|
|
|
| if (value != NULL) {
|
|
|