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

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

Issue 10910209: Add new PathService paths for Windows' All Users Desktop and Quick Launch folders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac compile Created 8 years, 3 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
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>
11 11
12 #include "base/base_paths.h" 12 #include "base/base_paths.h"
13 #include "base/base_paths_posix.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #import "base/mac/foundation_util.h" 15 #import "base/mac/foundation_util.h"
15 #import "base/mac/mac_util.h" 16 #import "base/mac/mac_util.h"
16 #import "base/mac/scoped_nsautorelease_pool.h" 17 #import "base/mac/scoped_nsautorelease_pool.h"
17 #include "base/path_service.h" 18 #include "base/path_service.h"
18 #include "chrome/common/chrome_constants.h" 19 #include "chrome/common/chrome_constants.h"
19 20
20 namespace { 21 namespace {
21 22
22 const FilePath* g_override_versioned_directory = NULL; 23 const FilePath* g_override_versioned_directory = NULL;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 133 }
133 134
134 bool GetUserDownloadsDirectory(FilePath* result) { 135 bool GetUserDownloadsDirectory(FilePath* result) {
135 return base::mac::GetUserDirectory(NSDownloadsDirectory, result); 136 return base::mac::GetUserDirectory(NSDownloadsDirectory, result);
136 } 137 }
137 138
138 bool GetUserPicturesDirectory(FilePath* result) { 139 bool GetUserPicturesDirectory(FilePath* result) {
139 return base::mac::GetUserDirectory(NSPicturesDirectory, result); 140 return base::mac::GetUserDirectory(NSPicturesDirectory, result);
140 } 141 }
141 142
142 bool GetUserDesktop(FilePath* result) {
143 return base::mac::GetUserDirectory(NSDesktopDirectory, result);
144 }
145
146 FilePath GetVersionedDirectory() { 143 FilePath GetVersionedDirectory() {
147 if (g_override_versioned_directory) 144 if (g_override_versioned_directory)
148 return *g_override_versioned_directory; 145 return *g_override_versioned_directory;
149 146
150 // Start out with the path to the running executable. 147 // Start out with the path to the running executable.
151 FilePath path; 148 FilePath path;
152 PathService::Get(base::FILE_EXE, &path); 149 PathService::Get(base::FILE_EXE, &path);
153 150
154 // One step up to MacOS, another to Contents. 151 // One step up to MacOS, another to Contents.
155 path = path.DirName().DirName(); 152 path = path.DirName().DirName();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 return bundle; 200 return bundle;
204 } 201 }
205 202
206 bool ProcessNeedsProfileDir(const std::string& process_type) { 203 bool ProcessNeedsProfileDir(const std::string& process_type) {
207 // For now we have no reason to forbid this on other MacOS as we don't 204 // For now we have no reason to forbid this on other MacOS as we don't
208 // have the roaming profile troubles there. 205 // have the roaming profile troubles there.
209 return true; 206 return true;
210 } 207 }
211 208
212 } // namespace chrome 209 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698