| # 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_features.cc", |
| "data_reduction_proxy_features.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_type_info.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", |
| "//services/network/public/cpp", |
| ] |
| |
| 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", |
| "//components/prefs", |
| "//components/prefs:test_support", |
| "//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", |
| ] |
| |
| deps = [ |
| ":common", |
| ":test_support", |
| "//base", |
| "//base/test:test_support", |
| "//components/prefs", |
| "//components/prefs: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)", |
| ] |
| } |