Chromium Code Reviews| Index: chrome/common/chrome_paths_mac.mm |
| diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm |
| index 82dbb3cc182d5d3906852976b96d8609dbdd706b..3d77e9ae8b8e6ed02b7e9a300996d6e26b6723a6 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"); |
|
Mark Mentovai
2009/09/16 19:33:27
In a Mac build with GOOGLE_CHROME_BUILD defined:
|
| #else |
| - NSString* tail = @"Chromium"; |
| + *result = result->Append("Chromium"); |
| #endif |
| - NSString* path = [base stringByAppendingPathComponent:tail]; |
| - *result = FilePath([path fileSystemRepresentation]); |
| success = true; |
| } |
| return success; |