| 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..834eb85d24e4887bd24e2d7860872d753c57069a 100644
|
| --- a/chrome/browser/ui/webui/options2/import_data_handler2.cc
|
| +++ b/chrome/browser/ui/webui/options2/import_data_handler2.cc
|
| @@ -32,7 +32,7 @@ ImportDataHandler::ImportDataHandler() : importer_host_(NULL),
|
| }
|
|
|
| ImportDataHandler::~ImportDataHandler() {
|
| - if (importer_list_)
|
| + if (importer_list_.get())
|
| importer_list_->SetObserver(NULL);
|
|
|
| if (importer_host_)
|
| @@ -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 =
|
|
|