chromium/chrome/common/net/BUILD.gn

# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chrome/common/features.gni")
import("//crypto/features.gni")

assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")

static_library("net") {
  sources = [
    "net_resource_provider.cc",
    "net_resource_provider.h",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  deps = [
    "//base",
    "//base:i18n",
    "//chrome:resources",
    "//chrome:strings",
    "//components/google/core/common",
    "//components/strings:components_strings_grit",
    "//components/url_formatter",
    "//crypto",
    "//net",
    "//net:net_resources",
    "//third_party/icu",
    "//ui/base",
  ]

  if (enable_webui_certificate_viewer) {
    sources += [
      "x509_certificate_model.cc",
      "x509_certificate_model.h",
    ]
  }

  if (use_nss_certs) {
    sources += [
      "x509_certificate_model_nss.cc",
      "x509_certificate_model_nss.h",
    ]
    deps += [ "//chrome/third_party/mozilla_security_manager" ]
    configs += [ "//build/config/linux/nss" ]
    allow_circular_includes_from =
        [ "//chrome/third_party/mozilla_security_manager" ]
  }
}