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..aea539b68df4fc236d831b6bd112eab6c010d6fa 100644 |
--- a/chrome/browser/importer/firefox_importer_utils_mac.mm |
+++ b/chrome/browser/importer/firefox_importer_utils_mac.mm |
@@ -23,9 +23,32 @@ FilePath GetProfilesINI() { |
ini_file = FilePath([profiles_ini fileSystemRepresentation]); |
} |
} |
- |
+ |
if (file_util::PathExists(ini_file)) |
return ini_file; |
return FilePath(); |
} |
+ |
+bool GetFirefoxDylibPath(FilePath *ff_dylib_dir) { |
+ CFURLRef appURL = nil; |
+ if (LSFindApplicationForInfo(kLSUnknownCreator, |
+ CFSTR("org.mozilla.firefox"), |
+ NULL, |
+ NULL, |
+ &appURL) != noErr) { |
+ return false; |
+ } |
+ NSBundle *ff_bundle = [NSBundle |
+ bundleWithPath:[reinterpret_cast<const NSURL*>(appURL) path]]; |
+ CFRelease(appURL); |
+ NSString *ff_library_path = [ff_bundle bundlePath]; |
+ |
+ // Get the path to the MACOS directory. |
+ ff_library_path = [ff_library_path |
John Grabowski
2009/08/21 01:13:18
[[NSBundle executablePath] stringByDeletingLastPat
|
+ stringByAppendingPathComponent:@"Contents"]; |
+ ff_library_path = [ff_library_path stringByAppendingPathComponent:@"MacOS"]; |
+ |
+ *ff_dylib_dir = FilePath([ff_library_path fileSystemRepresentation]); |
+ return true; |
+} |