blob: 7329f2e120fee5a18501239200433e0188379e49 [file] [log] [blame]
# 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.
if (is_android) {
import("//build/config/android/rules.gni")
}
browser_sources = [
"data_reduction_proxy_bypass_protocol.cc",
"data_reduction_proxy_bypass_protocol.h",
"data_reduction_proxy_bypass_stats.cc",
"data_reduction_proxy_bypass_stats.h",
"data_reduction_proxy_compression_stats.cc",
"data_reduction_proxy_compression_stats.h",
"data_reduction_proxy_config.cc",
"data_reduction_proxy_config.h",
"data_reduction_proxy_config_service_client.cc",
"data_reduction_proxy_config_service_client.h",
"data_reduction_proxy_configurator.cc",
"data_reduction_proxy_configurator.h",
"data_reduction_proxy_data.cc",
"data_reduction_proxy_data.h",
"data_reduction_proxy_data_use_observer.cc",
"data_reduction_proxy_data_use_observer.h",
"data_reduction_proxy_delegate.cc",
"data_reduction_proxy_delegate.h",
"data_reduction_proxy_interceptor.cc",
"data_reduction_proxy_interceptor.h",
"data_reduction_proxy_io_data.cc",
"data_reduction_proxy_io_data.h",
"data_reduction_proxy_metrics.cc",
"data_reduction_proxy_metrics.h",
"data_reduction_proxy_mutable_config_values.cc",
"data_reduction_proxy_mutable_config_values.h",
"data_reduction_proxy_network_delegate.cc",
"data_reduction_proxy_network_delegate.h",
"data_reduction_proxy_pingback_client.h",
"data_reduction_proxy_prefs.cc",
"data_reduction_proxy_prefs.h",
"data_reduction_proxy_request_options.cc",
"data_reduction_proxy_request_options.h",
"data_reduction_proxy_service.cc",
"data_reduction_proxy_service.h",
"data_reduction_proxy_service_observer.h",
"data_reduction_proxy_settings.cc",
"data_reduction_proxy_settings.h",
"data_reduction_proxy_util.cc",
"data_reduction_proxy_util.h",
"data_store.cc",
"data_store.h",
"data_usage_store.cc",
"data_usage_store.h",
"db_data_owner.cc",
"db_data_owner.h",
"network_properties_manager.cc",
"network_properties_manager.h",
"secure_proxy_checker.cc",
"secure_proxy_checker.h",
"warmup_url_fetcher.cc",
"warmup_url_fetcher.h",
]
if (is_android) {
static_library("browser_small") {
sources = browser_sources
deps = [
"//base",
"//components/data_reduction_proxy/core/common",
"//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
"//components/data_use_measurement/core",
"//components/data_use_measurement/core:ascriber",
"//components/pref_registry",
"//components/prefs",
"//components/previews/core",
"//components/variations",
"//components/variations/net",
"//crypto",
"//google_apis",
"//net:net",
"//services/network/public/cpp",
"//url:url",
]
}
java_cpp_enum("data_reduction_proxy_savings_cleared_enum_java") {
sources = [
"data_reduction_proxy_compression_stats.h",
]
}
}
static_library("browser") {
sources = browser_sources
sources += [
"data_store_impl.cc",
"data_store_impl.h",
]
public_deps = [
"//components/data_reduction_proxy/core/common",
"//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
]
deps = [
"//base",
"//components/data_use_measurement/core",
"//components/data_use_measurement/core:ascriber",
"//components/pref_registry",
"//components/prefs",
"//components/previews/core",
"//components/variations",
"//components/variations/net",
"//crypto",
"//google_apis",
"//net",
"//services/network:network_service",
"//services/network/public/cpp",
"//third_party/leveldatabase",
"//url",
]
defines = [ "USE_GOOGLE_API_KEYS" ]
if (!is_ios) {
defines += [ "USE_GOOGLE_API_KEYS_FOR_AUTH_KEY" ]
}
}
static_library("test_support") {
testonly = true
sources = [
"data_reduction_proxy_config_test_utils.cc",
"data_reduction_proxy_config_test_utils.h",
"data_reduction_proxy_settings_test_utils.cc",
"data_reduction_proxy_settings_test_utils.h",
"data_reduction_proxy_test_utils.cc",
"data_reduction_proxy_test_utils.h",
]
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
public_deps = [
":browser",
]
deps = [
"//base",
"//components/data_reduction_proxy/core/common",
"//components/data_reduction_proxy/core/common:test_support",
"//components/prefs:test_support",
"//components/previews/core:core",
"//components/previews/core:test_support",
"//net",
"//net:test_support",
"//services/network:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
bundle_data("unit_tests_bundle_data") {
visibility = [ ":unit_tests" ]
testonly = true
sources = [
"//components/test/data/data_reduction_proxy/direct/block10.html",
"//components/test/data/data_reduction_proxy/direct/block10.html.mock-http-headers",
"//components/test/data/data_reduction_proxy/direct/noblock.html",
"//components/test/data/data_reduction_proxy/direct/noblock.html.mock-http-headers",
"//components/test/data/data_reduction_proxy/proxy/block10.html",
"//components/test/data/data_reduction_proxy/proxy/block10.html.mock-http-headers",
"//components/test/data/data_reduction_proxy/proxy/noblock.html",
"//components/test/data/data_reduction_proxy/proxy/noblock.html.mock-http-headers",
]
outputs = [
"{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"data_reduction_proxy_bypass_protocol_unittest.cc",
"data_reduction_proxy_bypass_stats_unittest.cc",
"data_reduction_proxy_compression_stats_unittest.cc",
"data_reduction_proxy_config_service_client_unittest.cc",
"data_reduction_proxy_config_unittest.cc",
"data_reduction_proxy_configurator_unittest.cc",
"data_reduction_proxy_data_unittest.cc",
"data_reduction_proxy_delegate_unittest.cc",
"data_reduction_proxy_interceptor_unittest.cc",
"data_reduction_proxy_io_data_unittest.cc",
"data_reduction_proxy_metrics_unittest.cc",
"data_reduction_proxy_mutable_config_values_unittest.cc",
"data_reduction_proxy_network_delegate_unittest.cc",
"data_reduction_proxy_prefs_unittest.cc",
"data_reduction_proxy_request_options_unittest.cc",
"data_reduction_proxy_settings_unittest.cc",
"data_reduction_proxy_util_unittest.cc",
"data_usage_store_unittest.cc",
"network_properties_manager_unittest.cc",
"warmup_url_fetcher_unittest.cc",
]
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":browser",
":test_support",
":unit_tests_bundle_data",
"//base",
"//base/test:test_support",
"//components/data_reduction_proxy/core/common:test_support",
"//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
"//components/data_use_measurement/core:ascriber",
"//components/prefs:test_support",
"//components/previews/core",
"//components/previews/core:test_support",
"//components/variations",
"//net:test_support",
"//services/network:network_service",
"//services/network:test_support",
"//testing/gmock",
"//testing/gtest",
]
}