Skip to content

Commit

Permalink
Include proto descriptor as a resource
Browse files Browse the repository at this point in the history
Bug: 156903151
Change-Id: I45898f934ba8b8487532cd452bbb59eca7b644ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366723
Commit-Queue: Andrew Shulaev <ddrone@google.com>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802617}
  • Loading branch information
ddrone authored and Commit Bot committed Aug 28, 2020
1 parent 71768fa commit 86d7fe8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
15 changes: 15 additions & 0 deletions base/tracing/protos/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,27 @@
# found in the LICENSE file.

import("//third_party/protobuf/proto_library.gni")
import("//tools/grit/grit_rule.gni")

proto_library("chrome_track_event") {
proto_in_dir = "//"
proto_out_dir = "base/tracing/protos"
import_dirs = [ "//third_party/perfetto/" ]
sources = [ "chrome_track_event.proto" ]
generate_cc = false
generate_python = false
generate_descriptor = "chrome_track_event.descriptor"
}

grit("chrome_track_event_resources") {
source = "resources.grd"
outputs = [
"grit/tracing_proto_resources.h",
"tracing_proto_resources.pak",
]
deps = [ ":chrome_track_event" ]
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
]
}
17 changes: 17 additions & 0 deletions base/tracing/protos/resources.grd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<grit base_dir="." latest_public_release="0" current_release="1">
<outputs>
<output filename="grit/tracing_proto_resources.h" type="rc_header" />
<output filename="tracing_proto_resources.pak" type="data_package" />
</outputs>
<release seq="1">
<includes>
<include
name="chrome_track_event_descriptor"
file="${root_gen_dir}/base/tracing/protos/chrome_track_event.descriptor"
type="BINDATA"
compress="gzip"
use_base_dir="false" />
</includes>
</release>
</grit>
3 changes: 3 additions & 0 deletions tools/gritsettings/resource_ids.spec
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,9 @@
"ash/public/cpp/resources/ash_public_unscaled_resources.grd": {
"includes": [3140],
},
"base/tracing/protos/resources.grd": {
"includes": [3150],
},
"chromecast/renderer/resources/extensions_renderer_resources.grd": {
"includes": [3160],
},
Expand Down

0 comments on commit 86d7fe8

Please sign in to comment.