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

Side by Side Diff: chrome/common/chrome_paths_win.cc

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: Adjust links to pass presubmit 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
« no previous file with comments | « chrome/common/chrome_paths_mac.mm ('k') | chrome/installer/util/shell_util.cc » ('j') | 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 #include <windows.h> 7 #include <windows.h>
8 #include <knownfolders.h> 8 #include <knownfolders.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 125
126 bool GetUserPicturesDirectory(FilePath* result) { 126 bool GetUserPicturesDirectory(FilePath* result) {
127 return GetUserDirectory(CSIDL_MYPICTURES, result); 127 return GetUserDirectory(CSIDL_MYPICTURES, result);
128 } 128 }
129 129
130 bool GetUserVideosDirectory(FilePath* result) { 130 bool GetUserVideosDirectory(FilePath* result) {
131 return GetUserDirectory(CSIDL_MYVIDEO, result); 131 return GetUserDirectory(CSIDL_MYVIDEO, result);
132 } 132 }
133 133
134 bool GetUserDesktop(FilePath* result) {
135 return GetUserDirectory(CSIDL_DESKTOPDIRECTORY, result);
136 }
137
138 bool ProcessNeedsProfileDir(const std::string& process_type) { 134 bool ProcessNeedsProfileDir(const std::string& process_type) {
139 // On windows we don't want subprocesses other than the browser process and 135 // On windows we don't want subprocesses other than the browser process and
140 // service processes to be able to use the profile directory because if it 136 // service processes to be able to use the profile directory because if it
141 // lies on a network share the sandbox will prevent us from accessing it. 137 // lies on a network share the sandbox will prevent us from accessing it.
142 // TODO(pastarmovj): For now gpu and plugin broker processes are whitelisted 138 // TODO(pastarmovj): For now gpu and plugin broker processes are whitelisted
143 // too because they do use the profile dir in some way but this must be 139 // too because they do use the profile dir in some way but this must be
144 // investigated and fixed if possible. 140 // investigated and fixed if possible.
145 return process_type.empty() || 141 return process_type.empty() ||
146 process_type == switches::kServiceProcess || 142 process_type == switches::kServiceProcess ||
147 process_type == switches::kGpuProcess || 143 process_type == switches::kGpuProcess ||
148 process_type == switches::kNaClBrokerProcess || 144 process_type == switches::kNaClBrokerProcess ||
149 process_type == switches::kNaClLoaderProcess || 145 process_type == switches::kNaClLoaderProcess ||
150 process_type == switches::kPpapiBrokerProcess; 146 process_type == switches::kPpapiBrokerProcess;
151 } 147 }
152 148
153 } // namespace chrome 149 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths_mac.mm ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698