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

Unified Diff: components/browser_watcher/postmortem_report_collector.h

Issue 2372633002: Use the correct product/version for postmortem reports (Closed)
Patch Set: Merge 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/browser_watcher/postmortem_report_collector.h
diff --git a/components/browser_watcher/postmortem_report_collector.h b/components/browser_watcher/postmortem_report_collector.h
index aa21e22683fd44a5ab9bd8451d0e07fb054599b9..d9a617dad820717daae4388e2347f148adc07ab6 100644
--- a/components/browser_watcher/postmortem_report_collector.h
+++ b/components/browser_watcher/postmortem_report_collector.h
@@ -12,12 +12,15 @@
#include <memory>
#include <set>
+#include <string>
#include <vector>
+#include "base/callback_forward.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
+#include "base/strings/string16.h"
#include "components/browser_watcher/stability_report.pb.h"
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
@@ -28,6 +31,9 @@ namespace browser_watcher {
// TODO(manzagop): UMA metrics and some error logging.
class PostmortemReportCollector {
public:
+ using GetExecutableDetailsCallback =
grt (UTC plus 2) 2016/09/28 19:42:45 wdyt of getting rid of this callback and instead h
manzagop (departed) 2016/09/29 15:23:14 Done.
+ base::Callback<void(base::string16*, base::string16*, base::string16*)>;
+
// DO NOT CHANGE VALUES. This is logged persistently in a histogram.
enum CollectionStatus {
NONE = 0,
@@ -41,7 +47,8 @@ class PostmortemReportCollector {
COLLECTION_STATUS_MAX = 8
};
- PostmortemReportCollector() = default;
+ explicit PostmortemReportCollector(
+ const GetExecutableDetailsCallback& exe_details_cb);
virtual ~PostmortemReportCollector() = default;
// Collects postmortem stability reports from files found in |debug_info_dir|,
@@ -56,6 +63,10 @@ class PostmortemReportCollector {
const std::set<base::FilePath>& excluded_debug_files,
crashpad::CrashReportDatabase* report_database);
+ const std::string& product_name() const { return product_name_; }
+ const std::string& version_number() const { return version_number_; }
+ const std::string& channel_name() const { return channel_name_; }
+
private:
FRIEND_TEST_ALL_PREFIXES(PostmortemReportCollectorTest,
GetDebugStateFilePaths);
@@ -85,6 +96,10 @@ class PostmortemReportCollector {
const crashpad::UUID& report_id,
base::PlatformFile minidump_file);
+ std::string product_name_;
+ std::string version_number_;
+ std::string channel_name_;
+
DISALLOW_COPY_AND_ASSIGN(PostmortemReportCollector);
};

Powered by Google App Engine
This is Rietveld 408576698