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

Unified Diff: components/browser_watcher/watcher_metrics_provider_win.cc

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/watcher_metrics_provider_win.cc
diff --git a/components/browser_watcher/watcher_metrics_provider_win.cc b/components/browser_watcher/watcher_metrics_provider_win.cc
index 74db4f5c837a56dd8780ebe4cb6c773109242d54..8ed1742e9101b7c35826dfbb4c088bbeac07d9e2 100644
--- a/components/browser_watcher/watcher_metrics_provider_win.cc
+++ b/components/browser_watcher/watcher_metrics_provider_win.cc
@@ -9,6 +9,7 @@
#include <limits>
#include <memory>
#include <set>
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -25,6 +26,7 @@
#include "components/browser_watcher/features.h"
#include "components/browser_watcher/postmortem_report_collector.h"
#include "components/browser_watcher/stability_debugging.h"
+#include "components/browser_watcher/system_session_analyzer_win.h"
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
namespace browser_watcher {
@@ -263,12 +265,19 @@ void WatcherMetricsProviderWin::CollectPostmortemReportsOnBlockingPool() {
LogCollectionInitStatus(INIT_SUCCESS);
- // TODO(manzagop): fix incorrect version attribution on update.
+ // Get the reporter's version details.
base::string16 product_name, version_number, channel_name;
exe_details_cb_.Run(&product_name, &version_number, &channel_name);
- PostmortemReportCollector collector(base::UTF16ToUTF8(product_name),
- base::UTF16ToUTF8(version_number),
- base::UTF16ToUTF8(channel_name));
+
+ const size_t kSystemSessionsToInspect = 5U;
+ std::unique_ptr<SystemSessionEventFetcher> fetcher(
+ new SystemSessionEventFetcher(kSystemSessionsToInspect));
+ std::unique_ptr<SystemSessionAnalyzer> analyzer(
+ new SystemSessionAnalyzer(std::move(fetcher)));
+
+ PostmortemReportCollector collector(
+ base::UTF16ToUTF8(product_name), base::UTF16ToUTF8(version_number),
+ base::UTF16ToUTF8(channel_name), std::move(analyzer));
collector.CollectAndSubmitForUpload(stability_dir, GetStabilityFilePattern(),
excluded_debug_files,
crashpad_database.get());

Powered by Google App Engine
This is Rietveld 408576698