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 |
150 FilePath GetVersionedDirectory() { | 154 FilePath GetVersionedDirectory() { |
151 if (g_override_versioned_directory) | 155 if (g_override_versioned_directory) |
152 return *g_override_versioned_directory; | 156 return *g_override_versioned_directory; |
153 | 157 |
154 // Start out with the path to the running executable. | 158 // Start out with the path to the running executable. |
155 FilePath path; | 159 FilePath path; |
156 PathService::Get(base::FILE_EXE, &path); | 160 PathService::Get(base::FILE_EXE, &path); |
157 | 161 |
158 // One step up to MacOS, another to Contents. | 162 // One step up to MacOS, another to Contents. |
159 path = path.DirName().DirName(); | 163 path = path.DirName().DirName(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 return bundle; | 211 return bundle; |
208 } | 212 } |
209 | 213 |
210 bool ProcessNeedsProfileDir(const std::string& process_type) { | 214 bool ProcessNeedsProfileDir(const std::string& process_type) { |
211 // For now we have no reason to forbid this on other MacOS as we don't | 215 // For now we have no reason to forbid this on other MacOS as we don't |
212 // have the roaming profile troubles there. | 216 // have the roaming profile troubles there. |
213 return true; | 217 return true; |
214 } | 218 } |
215 | 219 |
216 } // namespace chrome | 220 } // namespace chrome |
OLD | NEW |