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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 132 } |
133 | 133 |
134 bool GetUserDownloadsDirectory(FilePath* result) { | 134 bool GetUserDownloadsDirectory(FilePath* result) { |
135 return base::mac::GetUserDirectory(NSDownloadsDirectory, result); | 135 return base::mac::GetUserDirectory(NSDownloadsDirectory, result); |
136 } | 136 } |
137 | 137 |
138 bool GetUserPicturesDirectory(FilePath* result) { | 138 bool GetUserPicturesDirectory(FilePath* result) { |
139 return base::mac::GetUserDirectory(NSPicturesDirectory, result); | 139 return base::mac::GetUserDirectory(NSPicturesDirectory, result); |
140 } | 140 } |
141 | 141 |
142 bool GetUserDesktop(FilePath* result) { | |
143 return base::mac::GetUserDirectory(NSDesktopDirectory, result); | |
144 } | |
145 | |
146 FilePath GetVersionedDirectory() { | 142 FilePath GetVersionedDirectory() { |
147 if (g_override_versioned_directory) | 143 if (g_override_versioned_directory) |
148 return *g_override_versioned_directory; | 144 return *g_override_versioned_directory; |
149 | 145 |
150 // Start out with the path to the running executable. | 146 // Start out with the path to the running executable. |
151 FilePath path; | 147 FilePath path; |
152 PathService::Get(base::FILE_EXE, &path); | 148 PathService::Get(base::FILE_EXE, &path); |
153 | 149 |
154 // One step up to MacOS, another to Contents. | 150 // One step up to MacOS, another to Contents. |
155 path = path.DirName().DirName(); | 151 path = path.DirName().DirName(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 return bundle; | 199 return bundle; |
204 } | 200 } |
205 | 201 |
206 bool ProcessNeedsProfileDir(const std::string& process_type) { | 202 bool ProcessNeedsProfileDir(const std::string& process_type) { |
207 // For now we have no reason to forbid this on other MacOS as we don't | 203 // For now we have no reason to forbid this on other MacOS as we don't |
208 // have the roaming profile troubles there. | 204 // have the roaming profile troubles there. |
209 return true; | 205 return true; |
210 } | 206 } |
211 | 207 |
212 } // namespace chrome | 208 } // namespace chrome |
OLD | NEW |