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/shell_integration.h" | 8 #include "chrome/browser/shell_integration.h" |
9 #include "chrome/common/importer/firefox_importer_utils.h" | 9 #include "chrome/common/importer/firefox_importer_utils.h" |
10 #include "chrome/common/importer/importer_bridge.h" | 10 #include "chrome/common/importer/importer_bridge.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 importer::SourceProfile* firefox = new importer::SourceProfile; | 86 importer::SourceProfile* firefox = new importer::SourceProfile; |
87 firefox->importer_name = GetFirefoxImporterName(app_path); | 87 firefox->importer_name = GetFirefoxImporterName(app_path); |
88 firefox->importer_type = firefox_type; | 88 firefox->importer_type = firefox_type; |
89 firefox->source_path = profile_path; | 89 firefox->source_path = profile_path; |
90 #if defined(OS_WIN) | 90 #if defined(OS_WIN) |
91 firefox->app_path = GetFirefoxInstallPathFromRegistry(); | 91 firefox->app_path = GetFirefoxInstallPathFromRegistry(); |
92 #endif | 92 #endif |
93 if (firefox->app_path.empty()) | 93 if (firefox->app_path.empty()) |
94 firefox->app_path = app_path; | 94 firefox->app_path = app_path; |
95 firefox->services_supported = importer::HISTORY | importer::FAVORITES | | 95 firefox->services_supported = importer::HISTORY | importer::FAVORITES | |
96 importer::PASSWORDS | importer::SEARCH_ENGINES; | 96 importer::PASSWORDS | importer::SEARCH_ENGINES | |
| 97 importer::AUTOFILL_FORM_DATA; |
97 firefox->locale = locale; | 98 firefox->locale = locale; |
98 profiles->push_back(firefox); | 99 profiles->push_back(firefox); |
99 } | 100 } |
100 | 101 |
101 std::vector<importer::SourceProfile*> DetectSourceProfilesWorker( | 102 std::vector<importer::SourceProfile*> DetectSourceProfilesWorker( |
102 const std::string& locale, | 103 const std::string& locale, |
103 bool include_interactive_profiles) { | 104 bool include_interactive_profiles) { |
104 DCHECK_CURRENTLY_ON(BrowserThread::FILE); | 105 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
105 | 106 |
106 std::vector<importer::SourceProfile*> profiles; | 107 std::vector<importer::SourceProfile*> profiles; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 173 } |
173 | 174 |
174 void ImporterList::SourceProfilesLoaded( | 175 void ImporterList::SourceProfilesLoaded( |
175 const base::Closure& profiles_loaded_callback, | 176 const base::Closure& profiles_loaded_callback, |
176 const std::vector<importer::SourceProfile*>& profiles) { | 177 const std::vector<importer::SourceProfile*>& profiles) { |
177 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 178 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
178 | 179 |
179 source_profiles_.assign(profiles.begin(), profiles.end()); | 180 source_profiles_.assign(profiles.begin(), profiles.end()); |
180 profiles_loaded_callback.Run(); | 181 profiles_loaded_callback.Run(); |
181 } | 182 } |
OLD | NEW |