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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Profile helper function, rebase Created 9 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/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);
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/most_visited_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698