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

Unified Diff: components/browser_watcher/postmortem_report_collector.h

Issue 2715903003: Bound the impact of system instability on chrome instability. (Closed)
Patch Set: record start timestamp, analysis metric, make log scrape lazy Created 3 years, 10 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 0650d37ece41cd8ae99b3ebf5572822a61e63968..f7153a59af7cecf3d9ca4c5717cd656fb5c08253 100644
--- a/components/browser_watcher/postmortem_report_collector.h
+++ b/components/browser_watcher/postmortem_report_collector.h
@@ -22,6 +22,7 @@
#include "base/macros.h"
#include "base/strings/string16.h"
#include "components/browser_watcher/stability_report.pb.h"
+#include "components/browser_watcher/system_session_analyzer_win.h"
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
namespace browser_watcher {
@@ -46,7 +47,8 @@ class PostmortemReportCollector {
PostmortemReportCollector(const std::string& product_name,
const std::string& version_number,
- const std::string& channel_name);
+ const std::string& channel_name,
+ std::unique_ptr<SystemSessionAnalyzer> analyzer);
virtual ~PostmortemReportCollector() = default;
// Collects postmortem stability reports from files found in |debug_info_dir|,
@@ -84,6 +86,9 @@ class PostmortemReportCollector {
FRIEND_TEST_ALL_PREFIXES(
PostmortemReportCollectorCollectionFromGlobalTrackerTest,
ModuleCollection);
+ FRIEND_TEST_ALL_PREFIXES(
+ PostmortemReportCollectorCollectionFromGlobalTrackerTest,
+ SystemStateTest);
// Virtual for unittesting.
virtual std::vector<base::FilePath> GetDebugStateFilePaths(
@@ -100,6 +105,8 @@ class PostmortemReportCollector {
// TODO(manzagop): move this for reuse in live scenario.
virtual CollectionStatus Collect(const base::FilePath& debug_state_file,
std::unique_ptr<StabilityReport>* report);
+ void SetReporterDetails(StabilityReport* report) const;
+ void DetermineSystemSate(StabilityReport* report) const;
Will Harris 2017/02/27 22:40:10 typo
manzagop (departed) 2017/02/28 14:51:50 Done.
void CollectThread(
const base::debug::ThreadActivityAnalyzer::Snapshot& snapshot,
ThreadState* thread_state);
@@ -113,6 +120,8 @@ class PostmortemReportCollector {
std::string version_number_;
std::string channel_name_;
+ std::unique_ptr<SystemSessionAnalyzer> system_session_analyzer_;
+
DISALLOW_COPY_AND_ASSIGN(PostmortemReportCollector);
};

Powered by Google App Engine
This is Rietveld 408576698