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

Unified Diff: components/browser_watcher/watcher_metrics_provider_win.h

Issue 2372633002: Use the correct product/version for postmortem reports (Closed)
Patch Set: Address clang errors Created 4 years, 2 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/browser_watcher/watcher_metrics_provider_win.h
diff --git a/components/browser_watcher/watcher_metrics_provider_win.h b/components/browser_watcher/watcher_metrics_provider_win.h
index 944e17df02ed5d1a90cea73c86c94bde9eabc198..65c5307d3016284b98beaf99df0cb7a28803c14e 100644
--- a/components/browser_watcher/watcher_metrics_provider_win.h
+++ b/components/browser_watcher/watcher_metrics_provider_win.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_BROWSER_WATCHER_WATCHER_METRICS_PROVIDER_WIN_H_
#define COMPONENTS_BROWSER_WATCHER_WATCHER_METRICS_PROVIDER_WIN_H_
+#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
@@ -19,6 +20,10 @@ namespace browser_watcher {
// process exit codes.
class WatcherMetricsProviderWin : public metrics::MetricsProvider {
public:
+ // A callback that provides product name, version number and channel name.
+ using GetExecutableDetailsCallback =
+ base::Callback<void(base::string16*, base::string16*, base::string16*)>;
+
static const char kBrowserExitCodeHistogramName[];
// Initializes the reporter. |io_task_runner| is used for collecting
@@ -27,6 +32,7 @@ class WatcherMetricsProviderWin : public metrics::MetricsProvider {
WatcherMetricsProviderWin(const base::string16& registry_path,
const base::FilePath& user_data_dir,
const base::FilePath& crash_dir,
+ const GetExecutableDetailsCallback& exe_details_cb,
base::TaskRunner* io_task_runner);
~WatcherMetricsProviderWin() override;
@@ -60,6 +66,7 @@ class WatcherMetricsProviderWin : public metrics::MetricsProvider {
const base::string16 registry_path_;
const base::FilePath user_data_dir_;
const base::FilePath crash_dir_;
+ GetExecutableDetailsCallback exe_details_cb_;
scoped_refptr<base::TaskRunner> io_task_runner_;
base::WeakPtrFactory<WatcherMetricsProviderWin> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698