summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer/firefox_importer_utils_mac.mm
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 17:27:27 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 17:27:27 +0000
commitbe9551df15b9d5ebbc1e52cd736c1c95e38f1821 (patch)
tree3798c6d714a64d9aa921422faba1bb7d38ce3fdd /chrome/browser/importer/firefox_importer_utils_mac.mm
parente7760ea7123b355cd3a758b9833aac36093869d7 (diff)
downloadchromium_src-be9551df15b9d5ebbc1e52cd736c1c95e38f1821.zip
chromium_src-be9551df15b9d5ebbc1e52cd736c1c95e38f1821.tar.gz
chromium_src-be9551df15b9d5ebbc1e52cd736c1c95e38f1821.tar.bz2
Bring up Firefox Password Import Unittest on OS X.
The NSSDecrptor class needs to be run in a child process on OS X, so we need to do some fancy footwork in the form of a bridge class. Also a few small fixes for surrounding code. BUG=18775 TEST=none Review URL: http://codereview.chromium.org/174206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/firefox_importer_utils_mac.mm')
-rw-r--r--chrome/browser/importer/firefox_importer_utils_mac.mm20
1 files changed, 19 insertions, 1 deletions
diff --git a/chrome/browser/importer/firefox_importer_utils_mac.mm b/chrome/browser/importer/firefox_importer_utils_mac.mm
index 5fd24b0..bea6b71 100644
--- a/chrome/browser/importer/firefox_importer_utils_mac.mm
+++ b/chrome/browser/importer/firefox_importer_utils_mac.mm
@@ -23,9 +23,27 @@ FilePath GetProfilesINI() {
ini_file = FilePath([profiles_ini fileSystemRepresentation]);
}
}
-
+
if (file_util::PathExists(ini_file))
return ini_file;
return FilePath();
}
+
+FilePath GetFirefoxDylibPath() {
+ CFURLRef appURL = nil;
+ if (LSFindApplicationForInfo(kLSUnknownCreator,
+ CFSTR("org.mozilla.firefox"),
+ NULL,
+ NULL,
+ &appURL) != noErr) {
+ return FilePath();
+ }
+ NSBundle *ff_bundle = [NSBundle
+ bundleWithPath:[reinterpret_cast<const NSURL*>(appURL) path]];
+ CFRelease(appURL);
+ NSString *ff_library_path = [[ff_bundle executablePath]
+ stringByDeletingLastPathComponent];
+
+ return FilePath([ff_library_path fileSystemRepresentation]);
+}