OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
11 #include "chrome/browser/importer/importer_data_types.h" | 11 #include "chrome/browser/importer/importer_data_types.h" |
12 #include "chrome/browser/importer/importer_list_observer.h" | 12 #include "chrome/browser/importer/importer_list_observer.h" |
13 #include "chrome/browser/shell_integration.h" | 13 #include "chrome/browser/shell_integration.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
16 | 16 |
17 #if defined(OS_MACOSX) | 17 #if defined(OS_MACOSX) |
18 #include <CoreFoundation/CoreFoundation.h> | 18 #include <CoreFoundation/CoreFoundation.h> |
19 | 19 |
20 #include "base/mac/foundation_util.h" | 20 #include "base/mac/foundation_util.h" |
21 #include "chrome/browser/importer/safari_importer.h" | 21 #include "chrome/browser/importer/safari_importer.h" |
22 #endif | 22 #endif |
23 | 23 |
| 24 using content::BrowserThread; |
| 25 |
24 namespace { | 26 namespace { |
25 | 27 |
26 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
27 void DetectIEProfiles(std::vector<importer::SourceProfile*>* profiles) { | 29 void DetectIEProfiles(std::vector<importer::SourceProfile*>* profiles) { |
28 // IE always exists and doesn't have multiple profiles. | 30 // IE always exists and doesn't have multiple profiles. |
29 importer::SourceProfile* ie = new importer::SourceProfile; | 31 importer::SourceProfile* ie = new importer::SourceProfile; |
30 ie->importer_name = l10n_util::GetStringUTF16(IDS_IMPORT_FROM_IE); | 32 ie->importer_name = l10n_util::GetStringUTF16(IDS_IMPORT_FROM_IE); |
31 ie->importer_type = importer::TYPE_IE; | 33 ie->importer_type = importer::TYPE_IE; |
32 ie->source_path.clear(); | 34 ie->source_path.clear(); |
33 ie->app_path.clear(); | 35 ie->app_path.clear(); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 source_profiles_->assign(profiles.begin(), profiles.end()); | 223 source_profiles_->assign(profiles.begin(), profiles.end()); |
222 source_profiles_loaded_ = true; | 224 source_profiles_loaded_ = true; |
223 source_thread_id_ = BrowserThread::UI; | 225 source_thread_id_ = BrowserThread::UI; |
224 | 226 |
225 observer_->OnSourceProfilesLoaded(); | 227 observer_->OnSourceProfilesLoaded(); |
226 observer_ = NULL; | 228 observer_ = NULL; |
227 | 229 |
228 // TODO(jhawkins): Remove once DetectSourceProfilesHack is removed. | 230 // TODO(jhawkins): Remove once DetectSourceProfilesHack is removed. |
229 is_observed_ = false; | 231 is_observed_ = false; |
230 } | 232 } |
OLD | NEW |