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

Unified Diff: chrome/browser/ui/webui/options2/autofill_options_handler2.cc

Issue 9994005: Separate handler initialization from page initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move anything that indirectly calls JS to InitializePage Created 8 years, 8 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/options2/autofill_options_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/autofill_options_handler2.cc b/chrome/browser/ui/webui/options2/autofill_options_handler2.cc
index 8d1374e3c16aca5dc1224cb56726bf1710ebd0bb..e7d4add98f3f6898ff76a9e2f32ad9aecce4b318 100644
--- a/chrome/browser/ui/webui/options2/autofill_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/autofill_options_handler2.cc
@@ -304,14 +304,14 @@ void AutofillOptionsHandler::GetLocalizedValues(
void AutofillOptionsHandler::InitializeHandler() {
personal_data_ = PersonalDataManagerFactory::GetForProfile(
Profile::FromWebUI(web_ui()));
- // personal_data_ is NULL in guest mode on Chrome OS.
- if (personal_data_)
- personal_data_->SetObserver(this);
}
void AutofillOptionsHandler::InitializePage() {
- if (personal_data_)
+ // personal_data_ is NULL in guest mode on Chrome OS.
+ if (personal_data_) {
+ personal_data_->SetObserver(this);
LoadAutofillData();
+ }
}
void AutofillOptionsHandler::RegisterMessages() {

Powered by Google App Engine
This is Rietveld 408576698