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 #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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 bool GetUserVideosDirectory(base::FilePath* result) { | 107 bool GetUserVideosDirectory(base::FilePath* result) { |
108 return GetUserDirectory(CSIDL_MYVIDEO, result); | 108 return GetUserDirectory(CSIDL_MYVIDEO, result); |
109 } | 109 } |
110 | 110 |
111 bool ProcessNeedsProfileDir(const std::string& process_type) { | 111 bool ProcessNeedsProfileDir(const std::string& process_type) { |
112 // On windows we don't want subprocesses other than the browser process and | 112 // On windows we don't want subprocesses other than the browser process and |
113 // service processes to be able to use the profile directory because if it | 113 // service processes to be able to use the profile directory because if it |
114 // lies on a network share the sandbox will prevent us from accessing it. | 114 // lies on a network share the sandbox will prevent us from accessing it. |
115 | 115 |
116 if (process_type.empty() || process_type == switches::kServiceProcess) | 116 if (process_type.empty() || |
| 117 process_type == switches::kCloudPrintServiceProcess) |
117 return true; | 118 return true; |
118 | 119 |
119 #if !defined(DISABLE_NACL) | 120 #if !defined(DISABLE_NACL) |
120 if (process_type == switches::kNaClBrokerProcess || | 121 if (process_type == switches::kNaClBrokerProcess || |
121 process_type == switches::kNaClLoaderProcess) { | 122 process_type == switches::kNaClLoaderProcess) { |
122 return true; | 123 return true; |
123 } | 124 } |
124 #endif | 125 #endif |
125 | 126 |
126 return false; | 127 return false; |
127 } | 128 } |
128 | 129 |
129 } // namespace chrome | 130 } // namespace chrome |
OLD | NEW |