diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-31 20:18:49 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-31 20:18:49 +0000 |
commit | 4dfae51bf8db229251104bc71ae14237a5989e1c (patch) | |
tree | 9b68c5d3803d389dbb84edd36d9b1e4f5afded03 /base/mac_util.mm | |
parent | cb69ca0e206805c4a4a4cdef2db44fb196820c2a (diff) | |
download | chromium_src-4dfae51bf8db229251104bc71ae14237a5989e1c.zip chromium_src-4dfae51bf8db229251104bc71ae14237a5989e1c.tar.gz chromium_src-4dfae51bf8db229251104bc71ae14237a5989e1c.tar.bz2 |
First cut at Safari Import - Home Page & History Only.
Review URL: http://codereview.chromium.org/159668
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac_util.mm')
-rw-r--r-- | base/mac_util.mm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/base/mac_util.mm b/base/mac_util.mm index 156cb1c..5304b75 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]; |