OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/importer/importer_list.h" | 5 #include "chrome/browser/importer/importer_list.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/first_run/first_run.h" | 8 #include "chrome/browser/first_run/first_run.h" |
9 #include "chrome/browser/importer/firefox_importer_utils.h" | 9 #include "chrome/browser/importer/firefox_importer_utils.h" |
10 #include "chrome/browser/importer/importer_bridge.h" | 10 #include "chrome/browser/importer/importer_bridge.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 if (version == 2) { | 73 if (version == 2) { |
74 firefox_type = importer::TYPE_FIREFOX2; | 74 firefox_type = importer::TYPE_FIREFOX2; |
75 } else if (version >= 3) { | 75 } else if (version >= 3) { |
76 firefox_type = importer::TYPE_FIREFOX3; | 76 firefox_type = importer::TYPE_FIREFOX3; |
77 } else { | 77 } else { |
78 // Ignores other versions of firefox. | 78 // Ignores other versions of firefox. |
79 return; | 79 return; |
80 } | 80 } |
81 | 81 |
82 importer::SourceProfile* firefox = new importer::SourceProfile; | 82 importer::SourceProfile* firefox = new importer::SourceProfile; |
83 firefox->importer_name = l10n_util::GetStringUTF16(IDS_IMPORT_FROM_FIREFOX); | 83 firefox->importer_name = GetFirefoxImporterName(app_path); |
84 firefox->importer_type = firefox_type; | 84 firefox->importer_type = firefox_type; |
85 firefox->source_path = profile_path; | 85 firefox->source_path = profile_path; |
86 #if defined(OS_WIN) | 86 #if defined(OS_WIN) |
87 firefox->app_path = GetFirefoxInstallPathFromRegistry(); | 87 firefox->app_path = GetFirefoxInstallPathFromRegistry(); |
88 #endif | 88 #endif |
89 if (firefox->app_path.empty()) | 89 if (firefox->app_path.empty()) |
90 firefox->app_path = app_path; | 90 firefox->app_path = app_path; |
91 firefox->services_supported = importer::HISTORY | importer::FAVORITES | | 91 firefox->services_supported = importer::HISTORY | importer::FAVORITES | |
92 importer::PASSWORDS | importer::SEARCH_ENGINES; | 92 importer::PASSWORDS | importer::SEARCH_ENGINES; |
93 profiles->push_back(firefox); | 93 profiles->push_back(firefox); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 source_profiles_.assign(profiles.begin(), profiles.end()); | 224 source_profiles_.assign(profiles.begin(), profiles.end()); |
225 source_profiles_loaded_ = true; | 225 source_profiles_loaded_ = true; |
226 source_thread_id_ = BrowserThread::UI; | 226 source_thread_id_ = BrowserThread::UI; |
227 | 227 |
228 observer_->OnSourceProfilesLoaded(); | 228 observer_->OnSourceProfilesLoaded(); |
229 observer_ = NULL; | 229 observer_ = NULL; |
230 | 230 |
231 // TODO(jhawkins): Remove once DetectSourceProfilesHack is removed. | 231 // TODO(jhawkins): Remove once DetectSourceProfilesHack is removed. |
232 is_observed_ = false; | 232 is_observed_ = false; |
233 } | 233 } |
OLD | NEW |