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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 if (!app_data_dir.AppendRelativePath(profile_dir, &cache_dir)) | 128 if (!app_data_dir.AppendRelativePath(profile_dir, &cache_dir)) |
129 return; | 129 return; |
130 | 130 |
131 *result = cache_dir; | 131 *result = cache_dir; |
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) { |
| 139 return base::mac::GetUserDirectory(NSPicturesDirectory, result); |
| 140 } |
| 141 |
138 bool GetUserDesktop(FilePath* result) { | 142 bool GetUserDesktop(FilePath* result) { |
139 return base::mac::GetUserDirectory(NSDesktopDirectory, result); | 143 return base::mac::GetUserDirectory(NSDesktopDirectory, result); |
140 } | 144 } |
141 | 145 |
142 FilePath GetVersionedDirectory() { | 146 FilePath GetVersionedDirectory() { |
143 if (g_override_versioned_directory) | 147 if (g_override_versioned_directory) |
144 return *g_override_versioned_directory; | 148 return *g_override_versioned_directory; |
145 | 149 |
146 // Start out with the path to the running executable. | 150 // Start out with the path to the running executable. |
147 FilePath path; | 151 FilePath path; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 return bundle; | 203 return bundle; |
200 } | 204 } |
201 | 205 |
202 bool ProcessNeedsProfileDir(const std::string& process_type) { | 206 bool ProcessNeedsProfileDir(const std::string& process_type) { |
203 // For now we have no reason to forbid this on other MacOS as we don't | 207 // For now we have no reason to forbid this on other MacOS as we don't |
204 // have the roaming profile troubles there. | 208 // have the roaming profile troubles there. |
205 return true; | 209 return true; |
206 } | 210 } |
207 | 211 |
208 } // namespace chrome | 212 } // namespace chrome |
OLD | NEW |