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

Unified Diff: chrome/browser/ui/webui/options2/import_data_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/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 4f8012218127c99424f54c158600f2276b0468ca..337732fda96870c69079f3bc8a722c80fae0c9cd 100644
--- a/chrome/browser/ui/webui/options2/import_data_handler2.cc
+++ b/chrome/browser/ui/webui/options2/import_data_handler2.cc
@@ -64,6 +64,9 @@ void ImportDataHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
void ImportDataHandler::InitializeHandler() {
Profile* profile = Profile::FromWebUI(web_ui());
importer_list_ = new ImporterList(profile->GetRequestContext());
+}
+
+void ImportDataHandler::InitializePage() {
importer_list_->DetectSourceProfiles(this);
}
@@ -128,10 +131,10 @@ void ImportDataHandler::ImportData(const ListValue* args) {
}
void ImportDataHandler::OnSourceProfilesLoaded() {
- InitializePage();
+ UpdateSupportedBrowsers();
}
-void ImportDataHandler::InitializePage() {
+void ImportDataHandler::UpdateSupportedBrowsers() {
if (!importer_list_->source_profiles_loaded())
return;

Powered by Google App Engine
This is Rietveld 408576698