1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
# Copyright 2014 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("//build/util/process_version.gni")
# Variables:
# deps: Extra dependencies.
template("common_tmpl") {
static_library(target_name) {
sources = [
"data_reduction_proxy_bypass_action_list.h",
"data_reduction_proxy_bypass_type_list.h",
"data_reduction_proxy_config_values.h",
"data_reduction_proxy_event_creator.cc",
"data_reduction_proxy_event_creator.h",
"data_reduction_proxy_event_storage_delegate.h",
"data_reduction_proxy_event_store.cc",
"data_reduction_proxy_event_store.h",
"data_reduction_proxy_headers.cc",
"data_reduction_proxy_headers.h",
"data_reduction_proxy_page_load_timing.cc",
"data_reduction_proxy_page_load_timing.h",
"data_reduction_proxy_params.cc",
"data_reduction_proxy_params.h",
"data_reduction_proxy_pref_names.cc",
"data_reduction_proxy_pref_names.h",
"data_reduction_proxy_server.cc",
"data_reduction_proxy_server.h",
"data_reduction_proxy_switches.cc",
"data_reduction_proxy_switches.h",
"data_reduction_proxy_util.cc",
"data_reduction_proxy_util.h",
"data_savings_recorder.h",
"lofi_decider.h",
"lofi_ui_service.h",
"resource_type_provider.h",
]
public_deps = [
":version_header",
]
deps = [
"//base",
"//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
"//components/variations",
"//google_apis",
]
defines = [ "USE_GOOGLE_API_KEYS" ]
if (defined(invoker.deps)) {
deps += invoker.deps
}
}
}
common_tmpl("common") {
deps = [
"//net",
"//url",
]
}
static_library("test_support") {
testonly = true
sources = [
"data_reduction_proxy_event_storage_delegate_test_utils.cc",
"data_reduction_proxy_event_storage_delegate_test_utils.h",
"data_reduction_proxy_headers_test_utils.cc",
"data_reduction_proxy_headers_test_utils.h",
"data_reduction_proxy_params_test_utils.cc",
"data_reduction_proxy_params_test_utils.h",
]
public_deps = [
":common",
]
deps = [
"//base",
"//net",
"//net:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"data_reduction_proxy_event_store_unittest.cc",
"data_reduction_proxy_headers_unittest.cc",
"data_reduction_proxy_params_unittest.cc",
"data_reduction_proxy_util_unittest.cc",
]
deps = [
":common",
":test_support",
"//base",
"//base/test:test_support",
# TODO this dependency seems wrong, but
# data_reduction_proxy_event_store_unittest.cc includes a file from it.
"//components/data_reduction_proxy/core/browser",
"//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
"//components/variations",
"//net:test_support",
"//testing/gtest",
]
}
process_version("version_header") {
template_file = "version.h.in"
sources = [
"//chrome/VERSION",
]
output = "$target_gen_dir/version.h"
extra_args = [
"-e",
"VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)",
]
}
|