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

Unified Diff: components/browser_watcher/postmortem_report_collector.h

Issue 2715903003: Bound the impact of system instability on chrome instability. (Closed)
Patch Set: Merge fixups Created 3 years, 9 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 ba9c07589317208a4e7ce431e6945587996215af..aab3ab81b7f142f6115b70c3da56bec37a59ea23 100644
--- a/components/browser_watcher/postmortem_report_collector.h
+++ b/components/browser_watcher/postmortem_report_collector.h
@@ -23,6 +23,7 @@
#include "base/strings/string16.h"
#include "components/browser_watcher/postmortem_report_extractor.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 {
@@ -37,7 +38,8 @@ class PostmortemReportCollector {
public:
PostmortemReportCollector(const std::string& product_name,
const std::string& version_number,
- const std::string& channel_name);
+ const std::string& channel_name,
+ SystemSessionAnalyzer* analyzer);
virtual ~PostmortemReportCollector();
// Collects postmortem stability reports from files found in |debug_info_dir|,
@@ -46,7 +48,7 @@ class PostmortemReportCollector {
// Returns the number crash reports successfully registered with the reporter.
// TODO(manzagop): consider mechanisms for partial collection if this is to be
// used on a critical path.
- int CollectAndSubmitForUpload(
+ int CollectAndSubmitAllPendingReports(
const base::FilePath& debug_info_dir,
const base::FilePath::StringType& debug_file_pattern,
const std::set<base::FilePath>& excluded_debug_files,
@@ -75,6 +77,9 @@ class PostmortemReportCollector {
FRIEND_TEST_ALL_PREFIXES(
PostmortemReportCollectorCollectionFromGlobalTrackerTest,
ModuleCollection);
+ FRIEND_TEST_ALL_PREFIXES(
+ PostmortemReportCollectorCollectionFromGlobalTrackerTest,
+ SystemStateTest);
// Virtual for unittesting.
virtual std::vector<base::FilePath> GetDebugStateFilePaths(
@@ -82,13 +87,18 @@ class PostmortemReportCollector {
const base::FilePath::StringType& debug_file_pattern,
const std::set<base::FilePath>& excluded_debug_files);
- CollectionStatus CollectAndSubmit(
+ CollectionStatus CollectAndSubmitOneReport(
const crashpad::UUID& client_id,
const base::FilePath& file,
crashpad::CrashReportDatabase* report_database);
- virtual CollectionStatus Collect(const base::FilePath& stability_file,
- StabilityReport* report);
+ virtual CollectionStatus CollectOneReport(
+ const base::FilePath& stability_file,
+ StabilityReport* report);
+
+ void SetReporterDetails(StabilityReport* report) const;
+
+ void RecordSystemShutdownState(StabilityReport* report) const;
virtual bool WriteReportToMinidump(StabilityReport* report,
const crashpad::UUID& client_id,
@@ -99,6 +109,8 @@ class PostmortemReportCollector {
std::string version_number_;
std::string channel_name_;
+ SystemSessionAnalyzer* system_session_analyzer_; // Not owned.
+
DISALLOW_COPY_AND_ASSIGN(PostmortemReportCollector);
};

Powered by Google App Engine
This is Rietveld 408576698