chromium/components/safe_browsing/core/common/proto/BUILD.gn

# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//components/safe_browsing/buildflags.gni")
import("//third_party/libprotobuf-mutator/fuzzable_proto_library.gni")
import("//third_party/protobuf/proto_library.gni")

# Because csd.proto is included from a proto file outside its own directory,
# proto_in_dir is required so that import can follow the Chromium style guide
# that all imports start from the source root.
#
# However, due to the way that protoc generates C++ code, this directive is
# also required in all build targets for protos that import csd.proto, including
# the protos in the same directory.  Those protos also need to import csd.proto
# using a path from the source root, otherwise they won't compile.

fuzzable_proto_library("csd_proto") {
  proto_in_dir = "//"
  sources = [ "csd.proto" ]
}

proto_library("webui_proto") {
  sources = [ "webui.proto" ]
}

fuzzable_proto_library("realtimeapi_proto") {
  proto_in_dir = "//"
  sources = [ "realtimeapi.proto" ]
  deps = [
    ":csd_proto",
    "//components/enterprise/common/proto:connectors_proto",
  ]
}

fuzzable_proto_library("client_model_proto") {
  proto_in_dir = "//"
  sources = [ "client_model.proto" ]
  deps = [ ":csd_proto" ]
}

proto_library("safebrowsingv5_proto") {
  sources = [ "safebrowsingv5.proto" ]
}