Index: chrome/common/chrome_paths_win.cc |
diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc |
index 5eefb78f6250e1b29d4870b750c48ab13ff31218..6f5f9fde6c9ebd97a47bf81db3784049bdcc03e5 100644 |
--- a/chrome/common/chrome_paths_win.cc |
+++ b/chrome/common/chrome_paths_win.cc |
@@ -16,6 +16,7 @@ |
#include "base/win/scoped_co_mem.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/installer/util/browser_distribution.h" |
+#include "content/public/common/content_switches.h" |
namespace chrome { |
@@ -97,4 +98,19 @@ bool GetUserDesktop(FilePath* result) { |
return true; |
} |
+bool ProcessNeedsProfileDir(const std::string& process_type) { |
+ // On windows we don't want subprocesses other than the browser process and |
+ // service processes to be able to use the profile directory because if it |
+ // lies on a network share the sandbox will prevent us from accessing it. |
+ // TODO(pastarmovj): For now gpu and plugin broker processes are whitelisted |
+ // too because they do use the profile dir in some way but this must be |
+ // investigated and fixed if possible. |
+ return process_type.empty() || |
+ process_type == switches::kServiceProcess || |
+ process_type == switches::kGpuProcess || |
+ process_type == switches::kNaClBrokerProcess || |
+ process_type == switches::kNaClLoaderProcess || |
+ process_type == switches::kPpapiBrokerProcess; |
+} |
+ |
} // namespace chrome |