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

Unified Diff: chrome/common/chrome_paths_mac.mm

Issue 174053: Set OS X cache directory to ~/Library/Caches/[app name]/[profile name] (Closed)
Patch Set: Addressed Mark's comments Created 11 years, 3 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
« base/file_path_unittest.cc ('K') | « chrome/browser/profile.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« base/file_path_unittest.cc ('K') | « chrome/browser/profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698