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

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

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/options_ui2.cc
diff --git a/chrome/browser/ui/webui/options2/options_ui2.cc b/chrome/browser/ui/webui/options2/options_ui2.cc
index fe559e6f1248692d3a8531270d1bbed51d08ef22..9272b5112bf9ece1549696faa20c500e7e8a4a9c 100644
--- a/chrome/browser/ui/webui/options2/options_ui2.cc
+++ b/chrome/browser/ui/webui/options2/options_ui2.cc
@@ -311,12 +311,15 @@ void OptionsUI::InitializeHandlers() {
// delivered after a new web page DOM has been brought up in an existing
// renderer (due to IPC delays), causing this method to be called twice. If
// that happens, ignore the second call.
- if (initialized_handlers_)
- return;
+ if (!initialized_handlers_) {
+ for (size_t i = 0; i < handlers_.size(); ++i)
+ handlers_[i]->Initialize();
+ }
+
initialized_handlers_ = true;
csilv 2012/03/13 20:59:49 Move this line into the 'if' block.
Dan Beam 2012/03/13 23:01:45 Done.
for (size_t i = 0; i < handlers_.size(); ++i)
- handlers_[i]->Initialize();
+ handlers_[i]->SendPageValues();
}
void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings,

Powered by Google App Engine
This is Rietveld 408576698