Index: chrome/browser/ui/webui/plugins_ui.cc |
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc |
index 397e6fcbc0d4c0e7756e2ec25f868c7a5d25a15d..d957f810307caed7c1da4ae4146e5c9b111284ed 100644 |
--- a/chrome/browser/ui/webui/plugins_ui.cc |
+++ b/chrome/browser/ui/webui/plugins_ui.cc |
@@ -159,7 +159,7 @@ PluginsDOMHandler::PluginsDOMHandler() |
} |
WebUIMessageHandler* PluginsDOMHandler::Attach(WebUI* web_ui) { |
- PrefService* prefs = web_ui->GetProfile()->GetPrefs(); |
+ PrefService* prefs = Profile::FromWebUI(web_ui)->GetPrefs(); |
show_details_.Init(prefs::kPluginsShowDetails, prefs, this); |
@@ -182,10 +182,12 @@ void PluginsDOMHandler::HandleRequestPluginsData(const ListValue* args) { |
} |
void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) { |
+ Profile* profile = Profile::FromWebUI(web_ui_); |
+ |
// If a non-first-profile user tries to trigger these methods sneakily, |
// forbid it. |
#if !defined(OS_CHROMEOS) |
- if (!web_ui_->GetProfile()->GetOriginalProfile()->first_launched()) |
+ if (!profile->GetOriginalProfile()->first_launched()) |
return; |
#endif |
@@ -230,7 +232,7 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) { |
// TODO(viettrungluu): We might also want to ensure that the plugins |
// list is always written to prefs even when the user hasn't disabled a |
// plugin. <http://crbug.com/39101> |
- plugin_updater->UpdatePreferences(web_ui_->GetProfile(), 0); |
+ plugin_updater->UpdatePreferences(profile, 0); |
} |
void PluginsDOMHandler::HandleSaveShowDetailsToPrefs(const ListValue* args) { |