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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 1252073002: Move pref names and default value into WebsiteSettingsInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@website-settings-registry-simple
Patch Set: Created 5 years, 4 months 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/ui/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 6b670fac7d4a3d8800f8fc346726993bc593f896..3350692ed36dd3a571e76a21349e9fc68d21d6b6 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -35,6 +35,8 @@
#include "components/content_settings/core/browser/content_settings_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/browser/plugins_field_trial.h"
+#include "components/content_settings/core/browser/website_settings_info.h"
+#include "components/content_settings/core/browser/website_settings_registry.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/google/core/browser/google_util.h"
@@ -432,8 +434,10 @@ void ContentSettingsHandler::GetLocalizedValues(
RegisterStrings(localized_strings, resources, arraysize(resources));
PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
- const base::Value* default_pref =
- prefs->GetDefaultPrefValue(prefs::kDefaultPluginsSetting);
+ const base::Value* default_pref = prefs->GetDefaultPrefValue(
+ content_settings::WebsiteSettingsRegistry::GetInstance()
+ ->Get(CONTENT_SETTINGS_TYPE_PLUGINS)
+ ->default_value_pref_name());
int default_value = CONTENT_SETTING_DEFAULT;
bool success = default_pref->GetAsInteger(&default_value);
« no previous file with comments | « chrome/browser/prefs/pref_model_associator_unittest.cc ('k') | chrome/common/extensions/api/content_settings.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698