diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-16 21:03:44 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-16 21:03:44 +0000 |
commit | 405a64b63ae9a6869923aa5b80cc77acf66e71bf (patch) | |
tree | 7881c66b26cc96095a454585a5ae40d3b5863c39 /chrome/common/chrome_paths_mac.mm | |
parent | 3fcec6daa921d2cf2ecdfa69740ad095700f9ddd (diff) | |
download | chromium_src-405a64b63ae9a6869923aa5b80cc77acf66e71bf.zip chromium_src-405a64b63ae9a6869923aa5b80cc77acf66e71bf.tar.gz chromium_src-405a64b63ae9a6869923aa5b80cc77acf66e71bf.tar.bz2 |
Set OS X cache directory to ~/Library/Caches/[app name]/[profile name]
- Added implementation of GetUserCacheDirectory() for OS X.
- Added FilePath::GetRelativePath().
- Implemented per-profile cache directories for OS X.
Patch by Fred Akalin <akalin@gmail.com>
Code review URL: http://codereview.chromium.org/174053
Review URL: http://codereview.chromium.org/204043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26387 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_mac.mm')
-rw-r--r-- | chrome/common/chrome_paths_mac.mm | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm index 82dbb3c..734a0a9 100644 --- a/chrome/common/chrome_paths_mac.mm +++ b/chrome/common/chrome_paths_mac.mm @@ -14,19 +14,12 @@ namespace chrome { bool GetDefaultUserDataDirectory(FilePath* result) { bool success = false; - NSArray* dirs = - NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, - NSUserDomainMask, YES); - if ([dirs count] && result) { - NSString* base = [dirs objectAtIndex:0]; + if (result && PathService::Get(base::DIR_APP_DATA, result)) { #if defined(GOOGLE_CHROME_BUILD) - base = [base stringByAppendingPathComponent:@"Google"]; - NSString* tail = @"Chrome"; + *result = result->Append("Google").Append("Chrome"); #else - NSString* tail = @"Chromium"; + *result = result->Append("Chromium"); #endif - NSString* path = [base stringByAppendingPathComponent:tail]; - *result = FilePath([path fileSystemRepresentation]); success = true; } return success; |