| # Copyright 2015 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. |
| |
| import("//third_party/protobuf/proto_library.gni") |
| |
| if (is_win) { |
| proto_library("activity_report_proto") { |
| sources = [ "activity_report.proto" ] |
| } |
| |
| static_library("browser_watcher_client") { |
| sources = [ |
| "exit_code_watcher_win.cc", |
| "exit_code_watcher_win.h", |
| ] |
| deps = [ |
| ":activity_report_proto", |
| ":stability_client", |
| ":stability_common", |
| "//base", |
| "//components/metrics", |
| "//third_party/crashpad/crashpad/client", |
| ] |
| } |
| |
| # This target links into the crashpad handler which lives in chrome_elf.dll |
| # on Windows. |
| static_library("activity_report") { |
| sources = [ |
| "activity_report_user_stream_data_source.cc", |
| "activity_report_user_stream_data_source.h", |
| ] |
| deps = [ |
| ":activity_report_proto", |
| ":stability_client", |
| ":stability_common", |
| "//base", |
| "//third_party/crashpad/crashpad/client", |
| "//third_party/crashpad/crashpad/compat", |
| "//third_party/crashpad/crashpad/handler", |
| "//third_party/crashpad/crashpad/minidump", |
| "//third_party/crashpad/crashpad/snapshot", |
| ] |
| } |
| |
| static_library("stability_common") { |
| sources = [ |
| "activity_report_extractor.cc", |
| "activity_report_extractor.h", |
| "minidump_user_streams.h", |
| ] |
| deps = [ |
| ":activity_report_proto", |
| ":stability_client", |
| "//base", |
| "//components/variations", |
| "//third_party/crashpad/crashpad/client:client", |
| "//third_party/crashpad/crashpad/util", |
| ] |
| } |
| |
| static_library("stability_client") { |
| sources = [ |
| "activity_data_names.cc", |
| "activity_data_names.h", |
| "activity_tracker_annotation.cc", |
| "activity_tracker_annotation.h", |
| "extended_crash_reporting.cc", |
| "extended_crash_reporting.h", |
| "extended_crash_reporting_metrics.cc", |
| "extended_crash_reporting_metrics.h", |
| "features.cc", |
| "features.h", |
| ] |
| deps = [ |
| ":activity_report_proto", |
| "//base", |
| "//third_party/crashpad/crashpad/client", |
| "//third_party/crashpad/crashpad/util", |
| ] |
| |
| # This needs to be a public dep because of base::win::PEImage. |
| public_deps = [ "//base:base_static" ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "activity_report_extractor_unittest.cc", |
| "activity_tracker_annotation_unittest.cc", |
| "exit_code_watcher_win_unittest.cc", |
| "extended_crash_reporting_win_unittest.cc", |
| ] |
| deps = [ |
| ":activity_report_proto", |
| ":browser_watcher_client", |
| ":stability_client", |
| ":stability_common", |
| "//base", |
| "//base/test:test_support", |
| "//components/crash/core/common:crash_key_lib", |
| "//components/metrics:metrics", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/crashpad/crashpad/client", |
| |
| # TODO(manzagop): remove this lib once Crashpad writes the minidumps. |
| "//third_party/crashpad/crashpad/minidump", |
| "//third_party/crashpad/crashpad/snapshot", |
| "//third_party/crashpad/crashpad/util", |
| ] |
| } |
| |
| executable("dump_stability") { |
| sources = [ "dump_stability_report_main_win.cc" ] |
| deps = [ |
| ":activity_report_proto", |
| "//base", |
| ] |
| } |
| |
| executable("fetch_system_session_events") { |
| sources = [ "fetch_system_session_events_main_win.cc" ] |
| deps = [ |
| ":activity_report_proto", |
| ":stability_client", |
| ":stability_common", |
| "//base", |
| "//components/metrics:metrics", |
| ] |
| } |
| } |