| # Copyright 2016 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//testing/test.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| # Works only on desktop platforms. |
| assert(is_win || is_linux || is_mac) |
| |
| proto_library("chrome_settings_full_runtime") { |
| proto_out_dir = "/tools/traffic_annotation" |
| |
| cc_include = "components/policy/proto/policy_proto_export.h" |
| |
| sources = [ |
| "$root_gen_dir" + |
| "/components/policy/proto/cloud_policy_full_runtime.proto", |
| "$root_gen_dir" + |
| "/components/policy/proto/chrome_settings_full_runtime.proto", |
| ] |
| |
| use_protobuf_full = true |
| |
| deps = [ |
| "//components/policy:full_runtime_code_generate", |
| "//third_party/protobuf:protobuf_full", |
| ] |
| } |
| |
| proto_library("traffic_annotation") { |
| sources = [ |
| "../traffic_annotation.proto", |
| ] |
| |
| import_dirs = [ "$root_gen_dir" + "/components/policy/proto" ] |
| |
| deps = [ |
| ":chrome_settings_full_runtime", |
| ] |
| |
| use_protobuf_full = true |
| } |
| |
| source_set("auditor_sources") { |
| sources = [ |
| "../../../net/traffic_annotation/network_traffic_annotation.h", |
| "../../../net/traffic_annotation/network_traffic_annotation_test_helper.h", |
| "traffic_annotation_auditor.cc", |
| "traffic_annotation_auditor.h", |
| "traffic_annotation_file_filter.cc", |
| "traffic_annotation_file_filter.h", |
| ] |
| |
| public_deps = [ |
| ":traffic_annotation", |
| "//base", |
| "//net:traffic_annotation", |
| "//third_party/protobuf:protobuf_full", |
| ] |
| } |
| |
| executable("traffic_annotation_auditor") { |
| sources = [ |
| "traffic_annotation_auditor_ui.cc", |
| ] |
| |
| deps = [ |
| ":auditor_sources", |
| ] |
| } |
| |
| test("traffic_annotation_auditor_unittests") { |
| sources = [ |
| "traffic_annotation_auditor_unittest.cc", |
| ] |
| deps = [ |
| ":auditor_sources", |
| "//base/test:run_all_unittests", |
| "//base/test:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |