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

Unified Diff: chrome/browser/importer/firefox_importer_utils_mac.mm

Issue 174206: Bring up Firefox Password Import Unittest on OS X. (Closed)
Patch Set: Small fix Created 11 years, 4 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
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;
+}

Powered by Google App Engine
This is Rietveld 408576698