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

Unified Diff: components/crash/content/app/crashpad_win.cc

Issue 2308763002: Integrate Crashpad UMA (Closed)
Patch Set: . Created 4 years, 3 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
Index: components/crash/content/app/crashpad_win.cc
diff --git a/components/crash/content/app/crashpad_win.cc b/components/crash/content/app/crashpad_win.cc
index 99bc2f3f2a9f3b28738936c435e7db9109e10ae2..bb9e3b4a5d07ae9bd2febc233aa3f541d7767719 100644
--- a/components/crash/content/app/crashpad_win.cc
+++ b/components/crash/content/app/crashpad_win.cc
@@ -7,6 +7,7 @@
#include <memory>
#include "base/environment.h"
+#include "base/files/file_util.h"
#include "base/lazy_instance.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string16.h"
@@ -53,6 +54,7 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
bool browser_process,
bool embedded_handler) {
base::FilePath database_path; // Only valid in the browser process.
+ base::FilePath metrics_path; // Only valid in the browser process.
bool result = false;
const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME";
@@ -65,6 +67,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
if (crash_reporter_client->GetCrashDumpLocation(&database_path_str))
database_path = base::FilePath(database_path_str);
+ base::string16 metrics_path_str;
+ if (crash_reporter_client->GetCrashMetricsLocation(&metrics_path_str)) {
+ metrics_path = base::FilePath(metrics_path_str);
+ CHECK(base::CreateDirectoryAndGetError(metrics_path, nullptr));
+ }
+
std::map<std::string, std::string> process_annotations;
GetPlatformCrashpadAnnotations(&process_annotations);
@@ -109,7 +117,8 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
}
result = g_crashpad_client.Get().StartHandler(
- exe_file, database_path, url, process_annotations, arguments, false);
+ exe_file, database_path, metrics_path, url, process_annotations,
+ arguments, false);
// If we're the browser, push the pipe name into the environment so child
// processes can connect to it. If we inherited another crashpad_handler's
« no previous file with comments | « components/crash/content/app/crashpad_mac.mm ('k') | third_party/crashpad/crashpad/client/crashpad_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698