summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer/importer.cc
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-29 21:12:11 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-29 21:12:11 +0000
commit839575632d4a75a63c7b803f81dbdf83683546e1 (patch)
treeb1523c997da62a4bf8419695a807077c57b0cf08 /chrome/browser/importer/importer.cc
parent1e463e1ebb3e81fbdaf6add1c64f4ad0ff68f67f (diff)
downloadchromium_src-839575632d4a75a63c7b803f81dbdf83683546e1.zip
chromium_src-839575632d4a75a63c7b803f81dbdf83683546e1.tar.gz
chromium_src-839575632d4a75a63c7b803f81dbdf83683546e1.tar.bz2
First cut at Firefox import on OSX + stubs for Safari import.
Known limitations: * Runs in browser process, should run in a separate process. * No UI. * No FF password import. BUG=15455 TEST=Check that firefox settings are correctly imported on first run, firefox password importing and Safari importing still don't work. Review URL: http://codereview.chromium.org/160341 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21995 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/importer.cc')
-rw-r--r--chrome/browser/importer/importer.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc
index f311540..df32899 100644
--- a/chrome/browser/importer/importer.cc
+++ b/chrome/browser/importer/importer.cc
@@ -650,6 +650,12 @@ Importer* ImporterHost::CreateImporterByType(ProfileType type) {
return new Firefox3Importer();
case GOOGLE_TOOLBAR5:
return new Toolbar5Importer();
+#if defined(OS_MACOSX)
+ case SAFARI:
+ // TODO(jeremy): Implement.
+ NOTIMPLEMENTED();
+ return NULL;
+#endif // OS_MACOSX
}
NOTREACHED();
return NULL;
@@ -694,6 +700,9 @@ void ImporterHost::DetectSourceProfiles() {
// TODO(brg) : Current UI requires win_util.
DetectGoogleToolbarProfiles();
#else
+#if defined(OS_MACOSX)
+ DetectSafariProfiles();
+#endif
DetectFirefoxProfiles();
#endif
}
@@ -807,3 +816,17 @@ void ImporterHost::DetectGoogleToolbarProfiles() {
source_profiles_.push_back(google_toolbar);
}
}
+
+#if defined(OS_MACOSX)
+void ImporterHost::DetectSafariProfiles() {
+ // TODO(jeremy):Check that Safari folder is in fact present.
+ ProfileInfo* safari = new ProfileInfo();
+ safari->browser_type = SAFARI;
+ safari->description = l10n_util::GetString(IDS_IMPORT_FROM_SAFARI);
+ safari->source_path.clear();
+ safari->app_path.clear();
+ safari->services_supported = HISTORY | FAVORITES | COOKIES | PASSWORDS |
+ SEARCH_ENGINES;
+ source_profiles_.push_back(safari);
+}
+#endif // OS_MACOSX