Index: chrome/browser/importer/firefox_importer_utils_mac.mm |
diff --git a/chrome/browser/importer/firefox_importer_utils_mac.mm b/chrome/browser/importer/firefox_importer_utils_mac.mm |
index 5fd24b006a5e32ae10a90647590df553aaaad3a0..bea6b71e7a38bef72d80e8136e06917dc0676685 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]); |
+} |