summaryrefslogtreecommitdiffstats
path: root/chrome/common/net/BUILD.gn
blob: dd3502aa61c92349736b7e7cf49475103fa38f1d (plain)
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
# 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/config/crypto.gni")

# GYP version: chrome/chrome_common.gypi:common_net
static_library("net") {
  sources = [
    "net_error_info.cc",
    "net_error_info.h",
    "net_resource_provider.cc",
    "net_resource_provider.h",
    "predictor_common.h",
    "url_util.cc",
    "url_util.h",
    "x509_certificate_model.cc",
    "x509_certificate_model.h",
    "x509_certificate_model_nss.cc",
    "x509_certificate_model_openssl.cc",
  ]

  deps = [
    "//base",
    "//chrome:resources",
    "//chrome:strings",
    "//crypto",
    "//net",
    "//net:net_resources",
    "//third_party/icu",
  ]

  if (is_ios) {
    sources -= [
      "net_resource_provider.cc",
      "x509_certificate_model.cc",
    ]
  } else {
    deps += [ "//gpu/ipc" ]
  }

  if (is_win || is_mac || is_ios) {
    sources -= [
      "x509_certificate_model_nss.cc",
      "x509_certificate_model_openssl.cc",
    ]
  }

  if (is_android) {
    sources -= [
      "x509_certificate_model.cc",
      "x509_certificate_model_openssl.cc",
    ]
    deps += [ "//third_party/boringssl" ]
  }

  if (use_openssl) {
    # networking_private_crypto.cc uses NSS functions.
    sources -= [
      "x509_certificate_model_nss.cc",
    ]
  } else if (is_linux) {
    # Already removed for non-Linux cases above.
    sources -= [
      "x509_certificate_model_openssl.cc",
    ]
  }

  if (is_win) {
    cflags = [ "/wd4267" ]
  }
}