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

Unified Diff: chrome/common/chrome_paths_win.cc

Issue 10306009: Make sure only the main browser process and service proceses are allowed to create the profile dire… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add gpu to the list of allowed processes. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_paths_mac.mm ('k') | chrome/common_constants.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1a2f02ae442d5a20a9ee4b026f6b668131f65383 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,16 @@ 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 no gpu 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;
+}
+
} // namespace chrome
« no previous file with comments | « chrome/common/chrome_paths_mac.mm ('k') | chrome/common_constants.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698