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

Unified Diff: components/browser_watcher/postmortem_report_collector_impl.h

Issue 2722223002: Separate collection logic from the extraction of the report (Closed)
Patch Set: 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_impl.h
diff --git a/components/browser_watcher/postmortem_report_collector_impl.h b/components/browser_watcher/postmortem_report_collector_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..21337771f124628a30f8db1b301322cc21afb928
--- /dev/null
+++ b/components/browser_watcher/postmortem_report_collector_impl.h
@@ -0,0 +1,36 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Implementation of the collection of a stability file to a protocol buffer.
+
+#ifndef COMPONENTS_BROWSER_WATCHER_POSTMORTEM_REPORT_COLLECTOR_IMPL_H_
+#define COMPONENTS_BROWSER_WATCHER_POSTMORTEM_REPORT_COLLECTOR_IMPL_H_
+
+#include "base/files/file_path.h"
+#include "components/browser_watcher/stability_report.pb.h"
+
+namespace browser_watcher {
+namespace impl {
+
+// DO NOT CHANGE VALUES. This is logged persistently in a histogram.
+enum CollectionStatus {
+ NONE = 0,
+ SUCCESS = 1, // Successfully registered a report with Crashpad.
+ ANALYZER_CREATION_FAILED = 2,
+ DEBUG_FILE_NO_DATA = 3,
+ PREPARE_NEW_CRASH_REPORT_FAILED = 4,
+ WRITE_TO_MINIDUMP_FAILED = 5,
+ DEBUG_FILE_DELETION_FAILED = 6,
+ FINISHED_WRITING_CRASH_REPORT_FAILED = 7,
+ COLLECTION_STATUS_MAX = 8
+};
+
+// Collects a stability report from a stability file.
Sigurður Ásgeirsson 2017/03/01 20:50:30 Extracts? Also, maybe you want to pass in the An
manzagop (departed) 2017/03/01 21:49:54 Done.
+CollectionStatus Collect(const base::FilePath& stability_file,
+ StabilityReport* report);
+
+} // namespace impl
+} // namespace browser_watcher
+
+#endif // COMPONENTS_BROWSER_WATCHER_POSTMORTEM_REPORT_COLLECTOR_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698