Index: base/base_paths_mac.mm |
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm |
index 14d1c201ca765d35bca7ce8ba87e1fda32e394b7..be6769aee3693d6d63231c0e05da40156afe1f65 100644 |
--- a/base/base_paths_mac.mm |
+++ b/base/base_paths_mac.mm |
@@ -2,12 +2,17 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "base/base_paths_mac.h" |
+// Defines base::PathProviderMac which implements paths specific to |
+// base_paths_mac.h and replaces base::PathProviderPosix for OS_MAXOSX in |
+// base/path_service.cc. |
#include <dlfcn.h> |
#import <Foundation/Foundation.h> |
#include <mach-o/dyld.h> |
+#include "base/base_paths.h" |
+#include "base/base_paths_mac.h" |
+#include "base/base_paths_posix.h" |
#include "base/compiler_specific.h" |
#include "base/file_path.h" |
#include "base/file_util.h" |
@@ -57,8 +62,6 @@ bool PathProviderMac(int key, FilePath* result) { |
case base::FILE_MODULE: |
return GetModulePathForAddress(result, |
reinterpret_cast<const void*>(&base::PathProviderMac)); |
- case base::DIR_CACHE: |
- return base::mac::GetUserDirectory(NSCachesDirectory, result); |
case base::DIR_APP_DATA: { |
bool success = base::mac::GetUserDirectory(NSApplicationSupportDirectory, |
result); |
@@ -91,6 +94,11 @@ bool PathProviderMac(int key, FilePath* result) { |
#endif |
return true; |
} |
+ case base::DIR_USER_DESKTOP: { |
+ return base::mac::GetUserDirectory(NSDesktopDirectory, result); |
+ } |
+ case base::DIR_CACHE: |
+ return base::mac::GetUserDirectory(NSCachesDirectory, result); |
case base::DIR_HOME: { |
*result = base::mac::NSStringToFilePath(NSHomeDirectory()); |
return true; |