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/importer/importer_list_observer.h" | 8 #include "chrome/browser/importer/importer_list_observer.h" |
9 #include "chrome/browser/shell_integration.h" | 9 #include "chrome/browser/shell_integration.h" |
10 #include "chrome/common/importer/firefox_importer_utils.h" | 10 #include "chrome/common/importer/firefox_importer_utils.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 if (ShellIntegration::IsFirefoxDefaultBrowser()) { | 168 if (ShellIntegration::IsFirefoxDefaultBrowser()) { |
169 DetectFirefoxProfiles(locale, &profiles); | 169 DetectFirefoxProfiles(locale, &profiles); |
170 DetectSafariProfiles(&profiles); | 170 DetectSafariProfiles(&profiles); |
171 } else { | 171 } else { |
172 DetectSafariProfiles(&profiles); | 172 DetectSafariProfiles(&profiles); |
173 DetectFirefoxProfiles(locale, &profiles); | 173 DetectFirefoxProfiles(locale, &profiles); |
174 } | 174 } |
175 #else | 175 #else |
176 DetectFirefoxProfiles(locale, &profiles); | 176 DetectFirefoxProfiles(locale, &profiles); |
177 #endif | 177 #endif |
178 importer::SourceProfile* bookmarks_file = new importer::SourceProfile; | |
gab
2013/09/23 14:39:14
You will also need to revert your change to chrome
tfarina
2013/09/28 17:10:04
Done.
| |
179 bookmarks_file->importer_name = | |
180 l10n_util::GetStringUTF16(IDS_IMPORT_FROM_BOOKMARKS_HTML_FILE); | |
181 bookmarks_file->importer_type = importer::TYPE_BOOKMARKS_FILE; | |
182 bookmarks_file->services_supported = importer::FAVORITES; | |
183 profiles.push_back(bookmarks_file); | |
184 | |
185 // TODO(jhawkins): Remove this condition once DetectSourceProfilesHack is | 178 // TODO(jhawkins): Remove this condition once DetectSourceProfilesHack is |
186 // removed. | 179 // removed. |
187 if (is_observed_) { | 180 if (is_observed_) { |
188 BrowserThread::PostTask( | 181 BrowserThread::PostTask( |
189 source_thread_id_, | 182 source_thread_id_, |
190 FROM_HERE, | 183 FROM_HERE, |
191 base::Bind(&ImporterList::SourceProfilesLoaded, this, profiles)); | 184 base::Bind(&ImporterList::SourceProfilesLoaded, this, profiles)); |
192 } else { | 185 } else { |
193 source_profiles_.assign(profiles.begin(), profiles.end()); | 186 source_profiles_.assign(profiles.begin(), profiles.end()); |
194 source_profiles_loaded_ = true; | 187 source_profiles_loaded_ = true; |
(...skipping 13 matching lines...) Expand all Loading... | |
208 source_profiles_.assign(profiles.begin(), profiles.end()); | 201 source_profiles_.assign(profiles.begin(), profiles.end()); |
209 source_profiles_loaded_ = true; | 202 source_profiles_loaded_ = true; |
210 source_thread_id_ = BrowserThread::UI; | 203 source_thread_id_ = BrowserThread::UI; |
211 | 204 |
212 observer_->OnSourceProfilesLoaded(); | 205 observer_->OnSourceProfilesLoaded(); |
213 observer_ = NULL; | 206 observer_ = NULL; |
214 | 207 |
215 // TODO(jhawkins): Remove once DetectSourceProfilesHack is removed. | 208 // TODO(jhawkins): Remove once DetectSourceProfilesHack is removed. |
216 is_observed_ = false; | 209 is_observed_ = false; |
217 } | 210 } |
OLD | NEW |