| Index: chrome/browser/importer/importer_list.cc
|
| diff --git a/chrome/browser/importer/importer_list.cc b/chrome/browser/importer/importer_list.cc
|
| index 598843e4c98ae672d386cdb9bea5b88c2e1ba911..1672a5c4206f2ef475b7778176d491832415478a 100644
|
| --- a/chrome/browser/importer/importer_list.cc
|
| +++ b/chrome/browser/importer/importer_list.cc
|
| @@ -106,6 +106,7 @@ ImporterList::ImporterList()
|
|
|
| void ImporterList::DetectSourceProfiles(
|
| const std::string& locale,
|
| + bool include_interactive_profiles,
|
| importer::ImporterListObserver* observer) {
|
| DCHECK(observer);
|
| observer_ = observer;
|
| @@ -114,14 +115,17 @@ void ImporterList::DetectSourceProfiles(
|
| bool res = BrowserThread::GetCurrentThreadIdentifier(&source_thread_id_);
|
| DCHECK(res);
|
|
|
| - BrowserThread::PostTask(
|
| - BrowserThread::FILE,
|
| - FROM_HERE,
|
| - base::Bind(&ImporterList::DetectSourceProfilesWorker, this, locale));
|
| + BrowserThread::PostTask(BrowserThread::FILE,
|
| + FROM_HERE,
|
| + base::Bind(&ImporterList::DetectSourceProfilesWorker,
|
| + this,
|
| + locale,
|
| + include_interactive_profiles));
|
| }
|
|
|
| -void ImporterList::DetectSourceProfilesHack(const std::string& locale) {
|
| - DetectSourceProfilesWorker(locale);
|
| +void ImporterList::DetectSourceProfilesHack(const std::string& locale,
|
| + bool include_interactive_profiles) {
|
| + DetectSourceProfilesWorker(locale, include_interactive_profiles);
|
| }
|
|
|
| const importer::SourceProfile& ImporterList::GetSourceProfileAt(
|
| @@ -146,7 +150,9 @@ const importer::SourceProfile& ImporterList::GetSourceProfileForImporterType(
|
| ImporterList::~ImporterList() {
|
| }
|
|
|
| -void ImporterList::DetectSourceProfilesWorker(const std::string& locale) {
|
| +void ImporterList::DetectSourceProfilesWorker(
|
| + const std::string& locale,
|
| + bool include_interactive_profiles) {
|
| // TODO(jhawkins): Remove this condition once DetectSourceProfilesHack is
|
| // removed.
|
| if (is_observed_)
|
| @@ -175,12 +181,14 @@ void ImporterList::DetectSourceProfilesWorker(const std::string& locale) {
|
| #else
|
| DetectFirefoxProfiles(locale, &profiles);
|
| #endif
|
| - importer::SourceProfile* bookmarks_file = new importer::SourceProfile;
|
| - bookmarks_file->importer_name =
|
| - l10n_util::GetStringUTF16(IDS_IMPORT_FROM_BOOKMARKS_HTML_FILE);
|
| - bookmarks_file->importer_type = importer::TYPE_BOOKMARKS_FILE;
|
| - bookmarks_file->services_supported = importer::FAVORITES;
|
| - profiles.push_back(bookmarks_file);
|
| + if (include_interactive_profiles) {
|
| + importer::SourceProfile* bookmarks_profile = new importer::SourceProfile;
|
| + bookmarks_profile->importer_name =
|
| + l10n_util::GetStringUTF16(IDS_IMPORT_FROM_BOOKMARKS_HTML_FILE);
|
| + bookmarks_profile->importer_type = importer::TYPE_BOOKMARKS_FILE;
|
| + bookmarks_profile->services_supported = importer::FAVORITES;
|
| + profiles.push_back(bookmarks_profile);
|
| + }
|
|
|
| // TODO(jhawkins): Remove this condition once DetectSourceProfilesHack is
|
| // removed.
|
|
|