summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_paths.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 21:33:52 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 21:33:52 +0000
commit0c298a521ad3a8f5c22a47fc0be633322c1c2384 (patch)
tree1a0ca472cb340e44f38456d179f795bcef5dcc76 /chrome/common/chrome_paths.cc
parent4e797d9ac6f59ac71613ffac7123ae0d16b65a26 (diff)
downloadchromium_src-0c298a521ad3a8f5c22a47fc0be633322c1c2384.zip
chromium_src-0c298a521ad3a8f5c22a47fc0be633322c1c2384.tar.gz
chromium_src-0c298a521ad3a8f5c22a47fc0be633322c1c2384.tar.bz2
Refuse to start if we can't get the user data directory.
The alternative is spewing private user data in random directories. BUG=22277 TEST=chmod -x ~/.config; Chrome should refuse to start Review URL: http://codereview.chromium.org/219043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27252 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths.cc')
-rw-r--r--chrome/common/chrome_paths.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 1a2209b..51ff8f5 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -74,8 +74,10 @@ bool PathProvider(int key, FilePath* result) {
FilePath cur;
switch (key) {
case chrome::DIR_USER_DATA:
- if (!GetDefaultUserDataDirectory(&cur))
+ if (!GetDefaultUserDataDirectory(&cur)) {
+ NOTREACHED();
return false;
+ }
create_dir = true;
break;
case chrome::DIR_USER_CACHE: