blob: a8bc0e3796a14649298dde0f60c2b001085b8c03 [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361# Copyright 2015 The Chromium Authors
stevenjbb237e2ae2015-07-02 22:02:112# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Yuta Hijikata62dbeaf2020-12-10 04:15:515import("//build/config/chromeos/ui_mode.gni")
6
stevenjbb237e2ae2015-07-02 22:02:117component("proxy_config") {
8 sources = [
abhishek.a2171c612852015-08-31 10:48:199 "pref_proxy_config_tracker.cc",
10 "pref_proxy_config_tracker.h",
11 "pref_proxy_config_tracker_impl.cc",
12 "pref_proxy_config_tracker_impl.h",
stevenjbb237e2ae2015-07-02 22:02:1113 "proxy_config_dictionary.cc",
14 "proxy_config_dictionary.h",
15 "proxy_config_export.h",
abhishek.a2171c612852015-08-31 10:48:1916 "proxy_config_pref_names.cc",
17 "proxy_config_pref_names.h",
stevenjbb237e2ae2015-07-02 22:02:1118 "proxy_prefs.cc",
19 "proxy_prefs.h",
20 ]
21
stevenjbb237e2ae2015-07-02 22:02:1122 defines = [ "PROXY_CONFIG_IMPLEMENTATION" ]
23
24 deps = [
25 "//base",
Jinyoung Hur4dc59212021-08-18 16:49:4826 "//components/policy:generated",
27 "//components/policy/core/browser",
28 "//components/policy/core/common",
brettw9f7802a22016-01-30 06:40:1729 "//components/prefs",
Jinyoung Hur4dc59212021-08-18 16:49:4830 "//components/strings",
stevenjb83368882015-07-10 20:51:4531 "//net",
abhishek.a2171c612852015-08-31 10:48:1932 "//url",
stevenjbb237e2ae2015-07-02 22:02:1133 ]
brettw15764b12015-11-30 22:11:0534
35 # TODO(https://crbug.com/562773): Break a header include cycle on ChromeOS
36 # and disable include checking so GN doesn't complain about the missing
37 # dependency (it still links OK). This cycle should be fixed and header
38 # checking enabled.
Yuta Hijikata62dbeaf2020-12-10 04:15:5139 if (is_chromeos_ash) {
brettw15764b12015-11-30 22:11:0540 check_includes = false
41 } else {
42 deps += [ "//components/pref_registry" ]
43 }
Yann Dago44d6cc322022-07-13 17:46:2544
45 if (!is_ios) {
46 sources += [
47 "proxy_policy_handler.cc",
48 "proxy_policy_handler.h",
49 ]
50 }
stevenjbb237e2ae2015-07-02 22:02:1151}
Brett Wilson817fec02015-08-22 20:36:4952
53source_set("unit_tests") {
54 testonly = true
55 sources = [
abhishek.a2131c6dc32015-09-17 07:10:4356 "pref_proxy_config_tracker_impl_unittest.cc",
Brett Wilson817fec02015-08-22 20:36:4957 "proxy_config_dictionary_unittest.cc",
58 "proxy_prefs_unittest.cc",
59 ]
60 deps = [
61 ":proxy_config",
brettw15764b12015-11-30 22:11:0562 "//base",
brettw15764b12015-11-30 22:11:0563 "//base/test:test_support",
Jinyoung Hur4dc59212021-08-18 16:49:4864 "//components/policy:generated",
65 "//components/policy/core/browser",
66 "//components/policy/core/browser:test_support",
67 "//components/policy/core/common",
brettw9f7802a22016-01-30 06:40:1768 "//components/prefs:test_support",
brettw15764b12015-11-30 22:11:0569 "//net",
Ramin Halavatica8d5252018-03-12 05:33:4970 "//net:test_support",
abhishek.a2131c6dc32015-09-17 07:10:4371 "//testing/gmock",
Brett Wilson817fec02015-08-22 20:36:4972 "//testing/gtest",
Jinyoung Hur4dc59212021-08-18 16:49:4873 "//third_party/abseil-cpp:absl",
Brett Wilson817fec02015-08-22 20:36:4974 ]
Yann Dago44d6cc322022-07-13 17:46:2575
76 if (!is_ios) {
77 sources += [ "proxy_policy_handler_unittest.cc" ]
78 }
Brett Wilson817fec02015-08-22 20:36:4979}