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

Unified Diff: base/mac_util.mm

Issue 159668: First cut at Safari Import - Home Page & History Only. (Closed)
Patch Set: Fix Stuart's comments. Created 11 years, 5 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: base/mac_util.mm
diff --git a/base/mac_util.mm b/base/mac_util.mm
index 156cb1c2fa7ba02d5d236dec7c9f63240c873213..5304b7585876f530c6b9c134ba205892a941b95d 100644
--- a/base/mac_util.mm
+++ b/base/mac_util.mm
@@ -53,6 +53,20 @@ NSBundle* MainAppBundle() {
return [NSBundle mainBundle];
}
+FilePath GetUserLibraryPath() {
+ NSArray* dirs = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
+ NSUserDomainMask, YES);
+ if ([dirs count] == 0)
+ return FilePath();
+
+ NSString* library_dir = [dirs objectAtIndex:0];
+ const char* library_dir_path = [library_dir fileSystemRepresentation];
+ if (!library_dir_path)
+ return FilePath();
+
+ return FilePath(library_dir_path);
+}
+
void SetOverrideAppBundle(NSBundle* bundle) {
[g_override_app_bundle release];
g_override_app_bundle = [bundle retain];

Powered by Google App Engine
This is Rietveld 408576698