| OLD | NEW |
| 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("//build/config/features.gni") |
| 5 import("//third_party/protobuf/proto_library.gni") | 6 import("//third_party/protobuf/proto_library.gni") |
| 6 | 7 |
| 7 # The proto files need to be a component to avoid duplicate symbols the way the | 8 # The proto files need to be a component to avoid duplicate symbols the way the |
| 8 # dependency structure is currently. Since proto_library generates a source | 9 # dependency structure is currently. Since proto_library generates a source |
| 9 # set, here we link the result into a component. | 10 # set, here we link the result into a component. |
| 10 component("proto") { | 11 component("proto") { |
| 11 public_deps = [ | 12 public_deps = [ |
| 12 ":proto_internal", | 13 ":proto_internal", |
| 13 ] | 14 ] |
| 14 } | 15 } |
| 15 | 16 |
| 16 proto_library("proto_internal") { | 17 proto_library("proto_internal") { |
| 17 visibility = [ ":proto" ] | 18 visibility = [ ":proto" ] |
| 18 | 19 |
| 19 sources = [ | 20 sources = [ |
| 20 "device_management_backend.proto", | 21 "device_management_backend.proto", |
| 21 "policy_signing_key.proto", | 22 "policy_signing_key.proto", |
| 22 ] | 23 ] |
| 23 if (!is_android && !is_ios) { | 24 if (!is_android && !is_ios) { |
| 24 sources += [ "chrome_extension_policy.proto" ] | 25 sources += [ "chrome_extension_policy.proto" ] |
| 25 } | 26 } |
| 26 if (is_chromeos) { | 27 if (use_cros_fe) { |
| 27 sources += [ "device_management_local.proto" ] | 28 sources += [ "device_management_local.proto" ] |
| 28 } | 29 } |
| 29 | 30 |
| 30 proto_out_dir = "policy/proto" | 31 proto_out_dir = "policy/proto" |
| 31 cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:" | 32 cc_generator_options = "dllexport_decl=POLICY_PROTO_EXPORT:" |
| 32 cc_include = "components/policy/policy_proto_export.h" | 33 cc_include = "components/policy/policy_proto_export.h" |
| 33 defines = [ "POLICY_PROTO_COMPILATION" ] | 34 defines = [ "POLICY_PROTO_COMPILATION" ] |
| 34 } | 35 } |
| OLD | NEW |