| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//third_party/protobuf/proto_library.gni") | 5 import("//third_party/protobuf/proto_library.gni") |
| 6 | 6 |
| 7 proto_library("stability_report_proto") { | 7 if (is_win) { |
| 8 sources = [ | 8 proto_library("stability_report_proto") { |
| 9 "stability_report.proto", | 9 sources = [ |
| 10 ] | 10 "stability_report.proto", |
| 11 } | 11 ] |
| 12 } |
| 12 | 13 |
| 13 static_library("browser_watcher") { | 14 static_library("browser_watcher") { |
| 14 # This is a separate lib to minimize the dependencies for its | 15 # This is a separate lib to minimize the dependencies for its |
| 15 # hosting binary "chrome_watcher.dll". | 16 # hosting binary "chrome_watcher.dll". |
| 16 sources = [ | 17 sources = [ |
| 17 "endsession_watcher_window_win.cc", | 18 "endsession_watcher_window_win.cc", |
| 18 "endsession_watcher_window_win.h", | 19 "endsession_watcher_window_win.h", |
| 19 "exit_code_watcher_win.cc", | 20 "exit_code_watcher_win.cc", |
| 20 "exit_code_watcher_win.h", | 21 "exit_code_watcher_win.h", |
| 21 "window_hang_monitor_win.cc", | 22 "window_hang_monitor_win.cc", |
| 22 "window_hang_monitor_win.h", | 23 "window_hang_monitor_win.h", |
| 23 ] | 24 ] |
| 24 deps = [ | 25 deps = [ |
| 25 "//base", | 26 "//base", |
| 26 ] | 27 ] |
| 27 } | 28 } |
| 28 | 29 |
| 29 static_library("browser_watcher_client") { | 30 static_library("browser_watcher_client") { |
| 30 sources = [ | 31 sources = [ |
| 31 "watcher_client_win.cc", | 32 "watcher_client_win.cc", |
| 32 "watcher_client_win.h", | 33 "watcher_client_win.h", |
| 33 "watcher_metrics_provider_win.cc", | 34 "watcher_metrics_provider_win.cc", |
| 34 "watcher_metrics_provider_win.h", | 35 "watcher_metrics_provider_win.h", |
| 35 ] | 36 ] |
| 36 deps = [ | 37 deps = [ |
| 37 ":postmortem_report_collector", | 38 ":postmortem_report_collector", |
| 38 ":stability", | 39 ":stability", |
| 39 "//base", | 40 "//base", |
| 40 "//components/metrics", | 41 "//components/metrics", |
| 41 "//third_party/crashpad/crashpad/client", | 42 "//third_party/crashpad/crashpad/client", |
| 42 ] | 43 ] |
| 43 } | 44 } |
| 44 | 45 |
| 45 static_library("postmortem_minidump_writer") { | 46 static_library("postmortem_minidump_writer") { |
| 46 # TODO(manzagop): remove this lib once Crashpad writes the minidumps. | 47 # TODO(manzagop): remove this lib once Crashpad writes the minidumps. |
| 47 sources = [ | 48 sources = [ |
| 48 "postmortem_minidump_writer.h", | 49 "postmortem_minidump_writer.h", |
| 49 "postmortem_minidump_writer_win.cc", | 50 "postmortem_minidump_writer_win.cc", |
| 50 ] | 51 ] |
| 51 deps = [ | 52 deps = [ |
| 52 ":stability_report_proto", | 53 ":stability_report_proto", |
| 53 "//base", | 54 "//base", |
| 54 "//third_party/crashpad/crashpad/client", | 55 "//third_party/crashpad/crashpad/client", |
| 55 "//third_party/crashpad/crashpad/minidump", | 56 "//third_party/crashpad/crashpad/minidump", |
| 56 "//third_party/crashpad/crashpad/util", | 57 "//third_party/crashpad/crashpad/util", |
| 57 ] | 58 ] |
| 58 } | 59 } |
| 59 | 60 |
| 60 static_library("postmortem_report_collector") { | 61 static_library("postmortem_report_collector") { |
| 61 sources = [ | 62 sources = [ |
| 62 "postmortem_report_collector.cc", | 63 "postmortem_report_collector.cc", |
| 63 "postmortem_report_collector.h", | 64 "postmortem_report_collector.h", |
| 64 ] | 65 ] |
| 65 deps = [ | 66 deps = [ |
| 66 ":postmortem_minidump_writer", | 67 ":postmortem_minidump_writer", |
| 67 ":stability_report_proto", | 68 ":stability_report_proto", |
| 68 "//base", | 69 "//base", |
| 69 "//third_party/crashpad/crashpad/client", | 70 "//third_party/crashpad/crashpad/client", |
| 70 "//third_party/crashpad/crashpad/util", | 71 "//third_party/crashpad/crashpad/util", |
| 71 ] | 72 ] |
| 73 } |
| 72 } | 74 } |
| 73 | 75 |
| 74 static_library("stability") { | 76 static_library("stability") { |
| 75 sources = [ | 77 sources = [ |
| 76 "features.cc", | 78 "features.cc", |
| 77 "features.h", | 79 "features.h", |
| 78 "stability_debugging_win.cc", | 80 "stability_debugging.cc", |
| 79 "stability_debugging_win.h", | 81 "stability_debugging.h", |
| 80 ] | 82 ] |
| 81 deps = [ | 83 deps = [ |
| 82 "//base", | 84 "//base", |
| 83 ] | 85 ] |
| 84 } | 86 } |
| 85 | 87 |
| 86 static_library("stability_data") { | 88 static_library("stability_data") { |
| 87 sources = [ | 89 sources = [ |
| 88 "stability_data_names.cc", | 90 "stability_data_names.cc", |
| 89 "stability_data_names.h", | 91 "stability_data_names.h", |
| 90 ] | 92 ] |
| 91 } | 93 } |
| 92 | 94 |
| 93 source_set("unit_tests") { | 95 if (is_win) { |
| 94 testonly = true | 96 source_set("unit_tests") { |
| 95 sources = [ | 97 testonly = true |
| 96 "endsession_watcher_window_win_unittest.cc", | 98 sources = [ |
| 97 "exit_code_watcher_win_unittest.cc", | 99 "endsession_watcher_window_win_unittest.cc", |
| 98 "postmortem_minidump_writer_win_unittest.cc", | 100 "exit_code_watcher_win_unittest.cc", |
| 99 "postmortem_report_collector_unittest.cc", | 101 "postmortem_minidump_writer_win_unittest.cc", |
| 100 "watcher_client_win_unittest.cc", | 102 "postmortem_report_collector_unittest.cc", |
| 101 "watcher_metrics_provider_win_unittest.cc", | 103 "watcher_client_win_unittest.cc", |
| 102 "window_hang_monitor_win_unittest.cc", | 104 "watcher_metrics_provider_win_unittest.cc", |
| 103 ] | 105 "window_hang_monitor_win_unittest.cc", |
| 104 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 106 ] |
| 105 deps = [ | 107 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 106 ":browser_watcher", | 108 deps = [ |
| 107 ":browser_watcher_client", | 109 ":browser_watcher", |
| 108 ":postmortem_minidump_writer", | 110 ":browser_watcher_client", |
| 109 ":postmortem_report_collector", | 111 ":postmortem_minidump_writer", |
| 110 ":stability_report_proto", | 112 ":postmortem_report_collector", |
| 111 "//base", | 113 ":stability_report_proto", |
| 112 "//base/test:test_support", | 114 "//base", |
| 113 "//testing/gmock", | 115 "//base/test:test_support", |
| 114 "//testing/gtest", | 116 "//testing/gmock", |
| 115 "//third_party/crashpad/crashpad/client", | 117 "//testing/gtest", |
| 118 "//third_party/crashpad/crashpad/client", |
| 116 | 119 |
| 117 # TODO(manzagop): remove this lib once Crashpad writes the minidumps. | 120 # TODO(manzagop): remove this lib once Crashpad writes the minidumps. |
| 118 "//third_party/crashpad/crashpad/compat", | 121 "//third_party/crashpad/crashpad/compat", |
| 119 "//third_party/crashpad/crashpad/minidump", | 122 "//third_party/crashpad/crashpad/minidump", |
| 120 "//third_party/crashpad/crashpad/snapshot", | 123 "//third_party/crashpad/crashpad/snapshot", |
| 121 "//third_party/crashpad/crashpad/util", | 124 "//third_party/crashpad/crashpad/util", |
| 122 ] | 125 ] |
| 126 } |
| 127 |
| 128 executable("dump_postmortem") { |
| 129 sources = [ |
| 130 "dump_postmortem_minidump_main_win.cc", |
| 131 ] |
| 132 deps = [ |
| 133 ":stability_report_proto", |
| 134 "//base", |
| 135 ] |
| 136 } |
| 123 } | 137 } |
| 124 | |
| 125 executable("dump_postmortem") { | |
| 126 sources = [ | |
| 127 "dump_postmortem_minidump_main_win.cc", | |
| 128 ] | |
| 129 deps = [ | |
| 130 ":stability_report_proto", | |
| 131 "//base", | |
| 132 ] | |
| 133 } | |
| OLD | NEW |