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