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

Side by Side Diff: components/tracing/BUILD.gn

Issue 2147613002: Skeleton for proto_zero_plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style and naming Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « components/tracing.gyp ('k') | components/tracing/test/example_messages.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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")
6
5 component("tracing") { 7 component("tracing") {
6 sources = [ 8 sources = [
7 "child/child_memory_dump_manager_delegate_impl.cc", 9 "child/child_memory_dump_manager_delegate_impl.cc",
8 "child/child_memory_dump_manager_delegate_impl.h", 10 "child/child_memory_dump_manager_delegate_impl.h",
9 "child/child_trace_message_filter.cc", 11 "child/child_trace_message_filter.cc",
10 "child/child_trace_message_filter.h", 12 "child/child_trace_message_filter.h",
11 "common/graphics_memory_dump_provider_android.cc", 13 "common/graphics_memory_dump_provider_android.cc",
12 "common/graphics_memory_dump_provider_android.h", 14 "common/graphics_memory_dump_provider_android.h",
13 "common/process_metrics_memory_dump_provider.cc", 15 "common/process_metrics_memory_dump_provider.cc",
14 "common/process_metrics_memory_dump_provider.h", 16 "common/process_metrics_memory_dump_provider.h",
(...skipping 30 matching lines...) Expand all
45 "tracing_export.h", 47 "tracing_export.h",
46 ] 48 ]
47 49
48 defines = [ "TRACING_IMPLEMENTATION" ] 50 defines = [ "TRACING_IMPLEMENTATION" ]
49 51
50 deps = [ 52 deps = [
51 "//base", 53 "//base",
52 ] 54 ]
53 } 55 }
54 56
57 # For unit testing of generated stubs.
58 proto_library("proto_zero_testing_messages") {
59 visibility = [ "//components/tracing/*" ]
60
61 sources = [
62 "test/example_messages.proto",
63 ]
64
65 generator_plugin_label = "tools/proto_zero_plugin:proto_zero_plugin"
66 generator_plugin_suffix = ".pbzero"
67 generate_cc = false
68 generate_python = false
69
70 # TODO(kraynov) Move away this complex path evaluation and dependency
71 # injection to proto_library.gni. All lines below should be removed.
72 # The problem is that root_out_dir and root_build_dir may differ in case of
73 # cross compilation. Also .exe will be appended on Windows.
74
75 plugin_host_label = generator_plugin_label + "($host_toolchain)"
76 generator_plugin =
77 rebase_path(get_label_info(plugin_host_label, "root_out_dir") + "/" +
78 get_label_info(plugin_host_label, "name"),
79 root_build_dir)
80 if (is_win) {
81 generator_plugin += ".exe"
82 }
83
84 deps = [
85 plugin_host_label,
86 ]
87 }
88
55 source_set("unit_tests") { 89 source_set("unit_tests") {
56 testonly = true 90 testonly = true
57 91
58 sources = [ 92 sources = [
59 "child/child_trace_message_filter_unittest.cc", 93 "child/child_trace_message_filter_unittest.cc",
60 "common/graphics_memory_dump_provider_android_unittest.cc", 94 "common/graphics_memory_dump_provider_android_unittest.cc",
61 "common/process_metrics_memory_dump_provider_unittest.cc", 95 "common/process_metrics_memory_dump_provider_unittest.cc",
62 "core/proto_utils_unittest.cc", 96 "core/proto_utils_unittest.cc",
63 "core/scattered_stream_writer_unittest.cc", 97 "core/scattered_stream_writer_unittest.cc",
64 "core/trace_ring_buffer_unittest.cc", 98 "core/trace_ring_buffer_unittest.cc",
65 "test/fake_scattered_buffer.cc", 99 "test/fake_scattered_buffer.cc",
100 "test/proto_zero_generation_unittest.cc",
66 ] 101 ]
67 102
68 deps = [ 103 deps = [
104 ":proto_zero_testing_messages",
69 ":tracing", 105 ":tracing",
70 "//base/test:test_support", 106 "//base/test:test_support",
71 "//ipc", 107 "//ipc",
72 "//testing/gmock:gmock", 108 "//testing/gmock:gmock",
73 "//testing/gtest", 109 "//testing/gtest",
74 ] 110 ]
75 111
76 if (!is_android) { 112 if (!is_android) {
77 sources += [ "browser/trace_config_file_unittest.cc" ] 113 sources += [ "browser/trace_config_file_unittest.cc" ]
78 deps += [ ":startup_tracing" ] 114 deps += [ ":startup_tracing" ]
79 } 115 }
80 } 116 }
OLDNEW
« no previous file with comments | « components/tracing.gyp ('k') | components/tracing/test/example_messages.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698