| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/base_paths_mac.h" | 5 #include "base/base_paths_mac.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #include <mach-o/dyld.h> | 9 #include <mach-o/dyld.h> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // src/xcodebuild/{Debug|Release}/Chromium.app/Contents/MacOS/Chromium | 76 // src/xcodebuild/{Debug|Release}/Chromium.app/Contents/MacOS/Chromium |
| 77 *result = result->DirName().DirName().DirName().DirName().DirName(); | 77 *result = result->DirName().DirName().DirName().DirName().DirName(); |
| 78 } else { | 78 } else { |
| 79 // Unit tests execute two levels deep from the source root, eg: | 79 // Unit tests execute two levels deep from the source root, eg: |
| 80 // src/xcodebuild/{Debug|Release}/base_unittests | 80 // src/xcodebuild/{Debug|Release}/base_unittests |
| 81 *result = result->DirName().DirName(); | 81 *result = result->DirName().DirName(); |
| 82 } | 82 } |
| 83 #endif | 83 #endif |
| 84 return true; | 84 return true; |
| 85 } | 85 } |
| 86 case base::DIR_HOME: { |
| 87 *result = base::mac::NSStringToFilePath(NSHomeDirectory()); |
| 88 return true; |
| 89 } |
| 86 default: | 90 default: |
| 87 return false; | 91 return false; |
| 88 } | 92 } |
| 89 } | 93 } |
| 90 | 94 |
| 91 } // namespace base | 95 } // namespace base |
| OLD | NEW |