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

Unified Diff: components/browser_watcher/watcher_metrics_provider_win.cc

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/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..45617eb176cb061282dfbaed8f324ae3747fa361 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,15 +265,18 @@ 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));
- collector.CollectAndSubmitForUpload(stability_dir, GetStabilityFilePattern(),
- excluded_debug_files,
- crashpad_database.get());
+
+ const size_t kSystemSessionsToInspect = 5U;
+ SystemSessionAnalyzer analyzer(kSystemSessionsToInspect);
+ PostmortemReportCollector collector(
+ base::UTF16ToUTF8(product_name), base::UTF16ToUTF8(version_number),
+ base::UTF16ToUTF8(channel_name), &analyzer);
+ collector.CollectAndSubmitAllPendingReports(
+ stability_dir, GetStabilityFilePattern(), excluded_debug_files,
+ crashpad_database.get());
}
} // namespace browser_watcher
« no previous file with comments | « components/browser_watcher/system_session_analyzer_win_unittest.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698