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

Unified Diff: chrome/browser/ui/webui/options2/startup_pages_handler2.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: copyright bumps 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
« no previous file with comments | « chrome/browser/ui/webui/options2/startup_pages_handler2.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options2/startup_pages_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/startup_pages_handler2.cc b/chrome/browser/ui/webui/options2/startup_pages_handler2.cc
index 1733986fdbd97e61c2a2831ae9e007ff8bae3358..e3d6fd4cbf6f407b2a42bfbdbac66c491533f042 100644
--- a/chrome/browser/ui/webui/options2/startup_pages_handler2.cc
+++ b/chrome/browser/ui/webui/options2/startup_pages_handler2.cc
@@ -81,13 +81,12 @@ void StartupPagesHandler::UpdateStartupPages() {
startup_custom_pages_table_model_->SetURLs(startup_pref.urls);
}
-void StartupPagesHandler::Initialize() {
+void StartupPagesHandler::InitializeHandler() {
Profile* profile = Profile::FromWebUI(web_ui());
startup_custom_pages_table_model_.reset(
new CustomHomePagesTableModel(profile));
startup_custom_pages_table_model_->SetObserver(this);
- UpdateStartupPages();
pref_change_registrar_.Init(profile->GetPrefs());
pref_change_registrar_.Add(prefs::kURLsToRestoreOnStartup, this);
@@ -95,6 +94,10 @@ void StartupPagesHandler::Initialize() {
autocomplete_controller_.reset(new AutocompleteController(profile, this));
}
+void StartupPagesHandler::InitializePage() {
+ UpdateStartupPages();
+}
+
void StartupPagesHandler::OnModelChanged() {
ListValue startup_pages;
int page_count = startup_custom_pages_table_model_->RowCount();
« no previous file with comments | « chrome/browser/ui/webui/options2/startup_pages_handler2.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698