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

Unified Diff: chrome/common/chrome_paths_win.cc

Issue 1781443003: crashpad win: Ensure database dir exists on first run (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | 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 37a262c486d82634261b87ec74ac4eb36c5f6d2c..4713a0a61d679daa5e78f96fe5bb91cc1f278297 100644
--- a/chrome/common/chrome_paths_win.cc
+++ b/chrome/common/chrome_paths_win.cc
@@ -11,6 +11,7 @@
#include <shobjidl.h>
#include "base/files/file_path.h"
+#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/win/scoped_co_mem.h"
#include "chrome/common/chrome_constants.h"
@@ -124,6 +125,10 @@ bool GetDefaultCrashDumpLocation(base::FilePath* crash_dir) {
// Windows. See https://crbug.com/564398.
if (!GetDefaultUserDataDirectory(crash_dir))
return false;
+ // We have to make sure the user data dir exists on first run. See
+ // http://crbug.com/591504.
+ if (!PathExists(*crash_dir) && !CreateDirectory(*crash_dir))
+ return false;
*crash_dir = crash_dir->Append(FILE_PATH_LITERAL("Crashpad"));
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698