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

Unified Diff: chrome/browser/ui/webui/options2/import_data_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
Index: chrome/browser/ui/webui/options2/import_data_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/import_data_handler2.cc b/chrome/browser/ui/webui/options2/import_data_handler2.cc
index 7a1ffe35ed4489a8b4b32620910d27e998800742..4f8012218127c99424f54c158600f2276b0468ca 100644
--- a/chrome/browser/ui/webui/options2/import_data_handler2.cc
+++ b/chrome/browser/ui/webui/options2/import_data_handler2.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -61,7 +61,7 @@ void ImportDataHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
IDS_IMPORT_SETTINGS_TITLE);
}
-void ImportDataHandler::Initialize() {
+void ImportDataHandler::InitializeHandler() {
Profile* profile = Profile::FromWebUI(web_ui());
importer_list_ = new ImporterList(profile->GetRequestContext());
importer_list_->DetectSourceProfiles(this);
@@ -128,6 +128,13 @@ void ImportDataHandler::ImportData(const ListValue* args) {
}
void ImportDataHandler::OnSourceProfilesLoaded() {
+ InitializePage();
+}
+
+void ImportDataHandler::InitializePage() {
+ if (!importer_list_->source_profiles_loaded())
+ return;
+
ListValue browser_profiles;
for (size_t i = 0; i < importer_list_->count(); ++i) {
const importer::SourceProfile& source_profile =
« no previous file with comments | « chrome/browser/ui/webui/options2/import_data_handler2.h ('k') | chrome/browser/ui/webui/options2/manage_profile_handler2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698