Index: components/browser_watcher/BUILD.gn |
diff --git a/components/browser_watcher/BUILD.gn b/components/browser_watcher/BUILD.gn |
index 883daece472ef5a8e9064c040f27a064d18a4e42..7f823c61df5cbbefdf9498603108430a6c08ab26 100644 |
--- a/components/browser_watcher/BUILD.gn |
+++ b/components/browser_watcher/BUILD.gn |
@@ -2,6 +2,14 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import("//third_party/protobuf/proto_library.gni") |
+ |
+proto_library("stability_report_proto") { |
+ sources = [ |
+ "stability_report.proto", |
+ ] |
+} |
+ |
static_library("browser_watcher") { |
# This is a separate lib to minimize the dependencies for its |
# hosting binary "chrome_watcher.dll". |
@@ -12,11 +20,22 @@ static_library("browser_watcher") { |
"exit_code_watcher_win.h", |
"exit_funnel_win.cc", |
"exit_funnel_win.h", |
+ "postmortem_minidump_writer.h", |
+ "postmortem_minidump_writer_win.cc", |
+ "postmortem_report_collector.cc", |
+ "postmortem_report_collector.h", |
"window_hang_monitor_win.cc", |
"window_hang_monitor_win.h", |
] |
deps = [ |
+ ":stability_report_proto", |
"//base", |
+ "//components/version_info", |
+ "//third_party/crashpad/crashpad/client", |
+ |
+ # TODO(manzagop): remove non client/ crashpad dependencies. |
+ "//third_party/crashpad/crashpad/minidump", |
+ "//third_party/crashpad/crashpad/util", |
] |
} |
@@ -28,8 +47,25 @@ static_library("browser_watcher_client") { |
"watcher_metrics_provider_win.h", |
] |
deps = [ |
+ ":browser_watcher", |
+ ":stability", |
"//base", |
"//components/metrics", |
+ |
+ # This seems to be needed to add crashpad to the include directories. |
+ "//third_party/crashpad/crashpad/client", |
+ ] |
+} |
+ |
+static_library("stability") { |
+ sources = [ |
+ "features.cc", |
+ "features.h", |
+ "stability_debugging_win.cc", |
+ "stability_debugging_win.h", |
+ ] |
+ deps = [ |
+ "//base", |
] |
} |
@@ -39,6 +75,9 @@ source_set("unit_tests") { |
"endsession_watcher_window_win_unittest.cc", |
"exit_code_watcher_win_unittest.cc", |
"exit_funnel_win_unittest.cc", |
+ "postmortem_minidump_writer_win_unittest.cc", |
+ "postmortem_report_collector_unittest.cc", |
+ "stability_debugging_win_unittest.cc", |
"watcher_client_win_unittest.cc", |
"watcher_metrics_provider_win_unittest.cc", |
"window_hang_monitor_win_unittest.cc", |
@@ -47,8 +86,29 @@ source_set("unit_tests") { |
deps = [ |
":browser_watcher", |
":browser_watcher_client", |
+ ":stability", |
+ ":stability_report_proto", |
"//base", |
"//base/test:test_support", |
+ "//components/version_info", |
+ "//testing/gmock", |
"//testing/gtest", |
+ "//third_party/crashpad/crashpad/client", |
+ |
+ # TODO(manzagop): remove non client/ crashpad dependencies. |
+ "//third_party/crashpad/crashpad/client", |
+ "//third_party/crashpad/crashpad/compat", |
+ "//third_party/crashpad/crashpad/snapshot", |
+ "//third_party/crashpad/crashpad/util", |
+ ] |
+} |
+ |
+executable("print_report") { |
+ sources = [ |
+ "print_report_main_win.cc", |
+ ] |
+ deps = [ |
+ ":stability_report_proto", |
+ "//base", |
] |
} |