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

Unified Diff: chrome/app/chrome_crash_reporter_client.cc

Issue 1481703002: win: Move Crashpad all into chrome.exe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unnecessary includes Created 5 years 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/BUILD.gn ('k') | chrome/app/chrome_exe_main_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_crash_reporter_client.cc
diff --git a/chrome/app/chrome_crash_reporter_client.cc b/chrome/app/chrome_crash_reporter_client.cc
index 2663a08017ad0aef4a048deeffd8eb441465f9f1..3f88af7bf56baa0293f594b19185f7327bb96821 100644
--- a/chrome/app/chrome_crash_reporter_client.cc
+++ b/chrome/app/chrome_crash_reporter_client.cc
@@ -16,6 +16,7 @@
#include "chrome/common/chrome_result_codes.h"
#include "chrome/common/crash_keys.h"
#include "chrome/common/env_vars.h"
+#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_settings.h"
#include "content/public/common/content_switches.h"
@@ -278,6 +279,20 @@ base::FilePath ChromeCrashReporterClient::GetReporterLogFilename() {
bool ChromeCrashReporterClient::GetCrashDumpLocation(
base::FilePath* crash_dir) {
+#if defined(OS_WIN)
+ // In order to be able to start crash handling very early, we do not rely on
+ // the chrome's PathService entries (for DIR_CRASH_DUMPS) being available on
Mark Mentovai 2015/12/03 15:11:32 Lose “the”.
scottmg 2015/12/03 18:14:51 Done.
+ // Windows. See http://crbug.com/564398.
+ base::FilePath result;
+ if (!PathService::Get(base::DIR_LOCAL_APP_DATA, &result))
Mark Mentovai 2015/12/03 15:11:32 Following up on the --user-data-dir discussion: T
scottmg 2015/12/03 18:14:51 Yeah, that's a good point. I filed crbug.com/56546
+ return false;
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ result = result.Append(dist->GetInstallSubDir());
+ result = result.Append(chrome::kUserDataDirname);
+ result = result.Append(FILE_PATH_LITERAL("Crashpad"));
+ *crash_dir = result;
+ return true;
+#else
// By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate
// location to write breakpad crash dumps can be set.
scoped_ptr<base::Environment> env(base::Environment::Create());
@@ -289,6 +304,7 @@ bool ChromeCrashReporterClient::GetCrashDumpLocation(
}
return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir);
+#endif
}
size_t ChromeCrashReporterClient::RegisterCrashKeys() {
« no previous file with comments | « chrome/BUILD.gn ('k') | chrome/app/chrome_exe_main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698