Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1049)

Side by Side Diff: chrome/common/chrome_paths_mac.mm

Issue 173853007: Media Galleries: Prune uninteresting folders when scanning. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_paths_internal.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 // The framework bundle is at a known path and name from the browser .app's 213 // The framework bundle is at a known path and name from the browser .app's
214 // versioned directory. 214 // versioned directory.
215 return GetVersionedDirectory().Append(kFrameworkName); 215 return GetVersionedDirectory().Append(kFrameworkName);
216 } 216 }
217 217
218 bool GetLocalLibraryDirectory(base::FilePath* result) { 218 bool GetLocalLibraryDirectory(base::FilePath* result) {
219 return base::mac::GetLocalDirectory(NSLibraryDirectory, result); 219 return base::mac::GetLocalDirectory(NSLibraryDirectory, result);
220 } 220 }
221 221
222 bool GetUserLibraryDirectory(base::FilePath* result) {
223 return base::mac::GetUserDirectory(NSLibraryDirectory, result);
224 }
225
226 bool GetUserApplicationsDirectory(base::FilePath* result) {
227 return base::mac::GetUserDirectory(NSApplicationDirectory, result);
228 }
229
222 bool GetGlobalApplicationSupportDirectory(base::FilePath* result) { 230 bool GetGlobalApplicationSupportDirectory(base::FilePath* result) {
223 return base::mac::GetLocalDirectory(NSApplicationSupportDirectory, result); 231 return base::mac::GetLocalDirectory(NSApplicationSupportDirectory, result);
224 } 232 }
225 233
226 NSBundle* OuterAppBundle() { 234 NSBundle* OuterAppBundle() {
227 // Cache this. Foundation leaks it anyway, and this should be the only call 235 // Cache this. Foundation leaks it anyway, and this should be the only call
228 // to OuterAppBundleInternal(). 236 // to OuterAppBundleInternal().
229 static NSBundle* bundle = OuterAppBundleInternal(); 237 static NSBundle* bundle = OuterAppBundleInternal();
230 return bundle; 238 return bundle;
231 } 239 }
232 240
233 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle, 241 bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle,
234 base::FilePath* result) { 242 base::FilePath* result) {
235 scoped_ptr<char, base::FreeDeleter> 243 scoped_ptr<char, base::FreeDeleter>
236 product_dir_name(ProductDirNameForBundle(bundle)); 244 product_dir_name(ProductDirNameForBundle(bundle));
237 return GetDefaultUserDataDirectoryForProduct(product_dir_name.get(), result); 245 return GetDefaultUserDataDirectoryForProduct(product_dir_name.get(), result);
238 } 246 }
239 247
240 #endif // !defined(OS_IOS) 248 #endif // !defined(OS_IOS)
241 249
242 bool ProcessNeedsProfileDir(const std::string& process_type) { 250 bool ProcessNeedsProfileDir(const std::string& process_type) {
243 // For now we have no reason to forbid this on other MacOS as we don't 251 // For now we have no reason to forbid this on other MacOS as we don't
244 // have the roaming profile troubles there. 252 // have the roaming profile troubles there.
245 return true; 253 return true;
246 } 254 }
247 255
248 } // namespace chrome 256 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698