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

Unified Diff: components/browser_watcher/stability_report_user_stream_data_source.h

Issue 2867063002: Stability instrumentation Crashpad integration (Closed)
Patch Set: clang compile Created 3 years, 7 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/stability_report_user_stream_data_source.h
diff --git a/components/browser_watcher/stability_report_user_stream_data_source.h b/components/browser_watcher/stability_report_user_stream_data_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9036cdfe42bc326ec356c31939b5a97e7f9477b
--- /dev/null
+++ b/components/browser_watcher/stability_report_user_stream_data_source.h
@@ -0,0 +1,40 @@
+// 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.
+
+#ifndef COMPONENTS_BROWSER_WATCHER_STABILITY_REPORT_USER_STREAM_DATA_SOURCE_H_
+#define COMPONENTS_BROWSER_WATCHER_STABILITY_REPORT_USER_STREAM_DATA_SOURCE_H_
+
+#include <memory>
+
+#include "base/files/file_path.h"
+#include "base/logging.h"
+#include "third_party/crashpad/crashpad/handler/user_stream_data_source.h"
+
+namespace crashpad {
+class MinidumpUserExtensionStreamDataSource;
+class ProcessSnapshot;
+}
+
+namespace browser_watcher {
+
+// Collects stability instrumentation corresponding to a ProcessSnapshot and
+// makes it available to the crash handler.
+class StabilityReportUserStreamDataSource
+ : public crashpad::UserStreamDataSource {
+ public:
+ explicit StabilityReportUserStreamDataSource(
+ const base::FilePath& user_data_dir);
+
+ std::unique_ptr<crashpad::MinidumpUserExtensionStreamDataSource>
+ ProduceStreamData(crashpad::ProcessSnapshot* process_snapshot) override;
+
+ private:
+ base::FilePath user_data_dir_;
+
+ DISALLOW_COPY_AND_ASSIGN(StabilityReportUserStreamDataSource);
+};
+
+} // namespace browser_watcher
+
+#endif // COMPONENTS_BROWSER_WATCHER_STABILITY_REPORT_USER_STREAM_DATA_SOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698