Index: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc |
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc |
index 759ae8208c2fe56b4b9727549d07589f3c32a643..306701589ce733fed70e0973254056455fd0a0cb 100644 |
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc |
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc |
@@ -20,7 +20,8 @@ void NewTabPageHandler::RegisterMessages() { |
} |
void NewTabPageHandler::HandleClosePromo(const ListValue* args) { |
- web_ui_->GetProfile()->GetPrefs()->SetBoolean(prefs::kNTPPromoClosed, true); |
+ Profile::FromWebUI(web_ui_)->GetPrefs()->SetBoolean(prefs::kNTPPromoClosed, |
+ true); |
NotificationService* service = NotificationService::current(); |
service->Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED, |
Source<NewTabPageHandler>(this), |
@@ -36,7 +37,7 @@ void NewTabPageHandler::HandlePageSelected(const ListValue* args) { |
CHECK(args->GetDouble(1, &index_double)); |
int index = static_cast<int>(index_double); |
- PrefService* prefs = web_ui_->GetProfile()->GetPrefs(); |
+ PrefService* prefs = Profile::FromWebUI(web_ui_)->GetPrefs(); |
prefs->SetInteger(prefs::kNTPShownPage, page_id | index); |
} |