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

Unified Diff: chrome/browser/ui/webui/options/password_manager_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/options/password_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index 9a3f20a8ade15f6c5b9d7f911a117303e758f4fc..a7e75004c448a2c05c31c543a21ad9743123887e 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -84,7 +84,7 @@ void PasswordManagerHandler::Initialize() {
return;
show_passwords_.Init(prefs::kPasswordManagerAllowShowPasswords,
- web_ui_->GetProfile()->GetPrefs(), this);
+ Profile::FromWebUI(web_ui_)->GetPrefs(), this);
// We should not cache web_ui_->GetProfile(). See crosbug.com/6304.
PasswordStore* store = GetPasswordStore();
if (store)
@@ -111,7 +111,8 @@ void PasswordManagerHandler::OnLoginsChanged() {
}
PasswordStore* PasswordManagerHandler::GetPasswordStore() {
- return web_ui_->GetProfile()->GetPasswordStore(Profile::EXPLICIT_ACCESS);
+ return Profile::FromWebUI(web_ui_)->
+ GetPasswordStore(Profile::EXPLICIT_ACCESS);
}
void PasswordManagerHandler::Observe(int type,
@@ -132,8 +133,8 @@ void PasswordManagerHandler::UpdatePasswordLists(const ListValue* args) {
password_list_.reset();
password_exception_list_.reset();
- languages_ =
- web_ui_->GetProfile()->GetPrefs()->GetString(prefs::kAcceptLanguages);
+ languages_ = Profile::FromWebUI(web_ui_)->GetPrefs()->
+ GetString(prefs::kAcceptLanguages);
populater_.Populate();
exception_populater_.Populate();
}

Powered by Google App Engine
This is Rietveld 408576698