OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_BROWSER_WATCHER_STABILITY_REPORT_USER_STREAM_DATA_SOURCE_H_ |
| 6 #define COMPONENTS_BROWSER_WATCHER_STABILITY_REPORT_USER_STREAM_DATA_SOURCE_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/files/file_path.h" |
| 11 #include "base/logging.h" |
| 12 #include "third_party/crashpad/crashpad/handler/user_stream_data_source.h" |
| 13 |
| 14 namespace crashpad { |
| 15 class MinidumpUserExtensionStreamDataSource; |
| 16 class ProcessSnapshot; |
| 17 } |
| 18 |
| 19 namespace browser_watcher { |
| 20 |
| 21 // Collects stability instrumentation corresponding to a ProcessSnapshot and |
| 22 // makes it available to the crash handler. |
| 23 class StabilityReportUserStreamDataSource |
| 24 : public crashpad::UserStreamDataSource { |
| 25 public: |
| 26 explicit StabilityReportUserStreamDataSource( |
| 27 const base::FilePath& user_data_dir); |
| 28 |
| 29 std::unique_ptr<crashpad::MinidumpUserExtensionStreamDataSource> |
| 30 ProduceStreamData(crashpad::ProcessSnapshot* process_snapshot) override; |
| 31 |
| 32 private: |
| 33 base::FilePath user_data_dir_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(StabilityReportUserStreamDataSource); |
| 36 }; |
| 37 |
| 38 } // namespace browser_watcher |
| 39 |
| 40 #endif // COMPONENTS_BROWSER_WATCHER_STABILITY_REPORT_USER_STREAM_DATA_SOURCE_H
_ |
OLD | NEW |