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

Unified Diff: chrome/common/chrome_paths.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/chrome.gyp ('k') | chrome/common/chrome_paths_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths.cc
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 37d1d9250a8c6f29c52db4cc13dfba9c8b55c145..03aca08f2c5fb49ce6b2a2854faddccbff0a2d3b 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -15,6 +15,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
+#include "content/public/common/content_switches.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
@@ -144,6 +145,9 @@ bool PathProvider(int key, FilePath* result) {
FilePath cur;
switch (key) {
case chrome::DIR_USER_DATA:
+ CHECK(ProcessNeedsProfileDir(
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kProcessType)));
if (!GetDefaultUserDataDirectory(&cur)) {
NOTREACHED();
return false;
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/chrome_paths_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698