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

Unified Diff: components/browser_watcher/postmortem_report_collector.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/postmortem_report_collector.h
diff --git a/components/browser_watcher/postmortem_report_collector.h b/components/browser_watcher/postmortem_report_collector.h
index aa21e22683fd44a5ab9bd8451d0e07fb054599b9..dffdc6e3214cc3c4fc5b2bdadc3f59aa041acd0b 100644
--- a/components/browser_watcher/postmortem_report_collector.h
+++ b/components/browser_watcher/postmortem_report_collector.h
@@ -12,12 +12,14 @@
#include <memory>
#include <set>
+#include <string>
#include <vector>
#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"
@@ -41,7 +43,9 @@ class PostmortemReportCollector {
COLLECTION_STATUS_MAX = 8
};
- PostmortemReportCollector() = default;
+ PostmortemReportCollector(const std::string& product_name,
+ const std::string& version_number,
+ const std::string& channel_name);
virtual ~PostmortemReportCollector() = default;
// Collects postmortem stability reports from files found in |debug_info_dir|,
@@ -56,6 +60,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 +93,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