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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_login_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/ntp_login_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
index c2973fd8bdaa0dca00eb81467fb1b1359877a3ff..356cc81e7987af3301e136a83011b55b8cea0c78 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
@@ -23,7 +23,7 @@ NTPLoginHandler::~NTPLoginHandler() {
}
WebUIMessageHandler* NTPLoginHandler::Attach(WebUI* web_ui) {
- PrefService* pref_service = web_ui->GetProfile()->GetPrefs();
+ PrefService* pref_service = Profile::FromWebUI(web_ui)->GetPrefs();
username_pref_.Init(prefs::kGoogleServicesUsername, pref_service, this);
return WebUIMessageHandler::Attach(web_ui);
@@ -48,7 +48,7 @@ void NTPLoginHandler::HandleInitializeLogin(const ListValue* args) {
}
void NTPLoginHandler::UpdateLogin() {
- std::string username = web_ui_->GetProfile()->GetPrefs()->GetString(
+ std::string username = Profile::FromWebUI(web_ui_)->GetPrefs()->GetString(
prefs::kGoogleServicesUsername);
StringValue string_value(username);
web_ui_->CallJavascriptFunction("updateLogin", string_value);
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_sync_setup_handler.cc ('k') | chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698