| 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 "chrome/common/chrome_paths_internal.h" | 5 #include "chrome/common/chrome_paths_internal.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 | 141 |
| 142 bool GetUserPicturesDirectory(FilePath* result) { | 142 bool GetUserPicturesDirectory(FilePath* result) { |
| 143 return base::mac::GetUserDirectory(NSPicturesDirectory, result); | 143 return base::mac::GetUserDirectory(NSPicturesDirectory, result); |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool GetUserVideosDirectory(FilePath* result) { | 146 bool GetUserVideosDirectory(FilePath* result) { |
| 147 return base::mac::GetUserDirectory(NSMoviesDirectory, result); | 147 return base::mac::GetUserDirectory(NSMoviesDirectory, result); |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool GetUserDesktop(FilePath* result) { | |
| 151 return base::mac::GetUserDirectory(NSDesktopDirectory, result); | |
| 152 } | |
| 153 | |
| 154 FilePath GetVersionedDirectory() { | 150 FilePath GetVersionedDirectory() { |
| 155 if (g_override_versioned_directory) | 151 if (g_override_versioned_directory) |
| 156 return *g_override_versioned_directory; | 152 return *g_override_versioned_directory; |
| 157 | 153 |
| 158 // Start out with the path to the running executable. | 154 // Start out with the path to the running executable. |
| 159 FilePath path; | 155 FilePath path; |
| 160 PathService::Get(base::FILE_EXE, &path); | 156 PathService::Get(base::FILE_EXE, &path); |
| 161 | 157 |
| 162 // One step up to MacOS, another to Contents. | 158 // One step up to MacOS, another to Contents. |
| 163 path = path.DirName().DirName(); | 159 path = path.DirName().DirName(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 return bundle; | 207 return bundle; |
| 212 } | 208 } |
| 213 | 209 |
| 214 bool ProcessNeedsProfileDir(const std::string& process_type) { | 210 bool ProcessNeedsProfileDir(const std::string& process_type) { |
| 215 // For now we have no reason to forbid this on other MacOS as we don't | 211 // For now we have no reason to forbid this on other MacOS as we don't |
| 216 // have the roaming profile troubles there. | 212 // have the roaming profile troubles there. |
| 217 return true; | 213 return true; |
| 218 } | 214 } |
| 219 | 215 |
| 220 } // namespace chrome | 216 } // namespace chrome |
| OLD | NEW |