Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: chrome/browser/importer/importer_list.cc

Issue 24345002: Do not add "Bookmarks File" to ImporterList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/importer/importer_list.h ('k') | chrome/browser/ui/webui/options/import_data_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/importer/importer_list.h ('k') | chrome/browser/ui/webui/options/import_data_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698