Clean up cache storage implementation DCHECKs.
[chromium-blink-merge.git] / chrome / utility / BUILD.gn
blobfbe9073af84ca820c4226d4c9542e47100e68b17
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
8 gypi_values = exec_script("//build/gypi_to_gn.py",
9                           [ rebase_path("../chrome_utility.gypi") ],
10                           "scope",
11                           [ "../chrome_utility.gypi" ])
13 static_library("utility") {
14   sources = rebase_path(gypi_values.chrome_utility_sources, ".", "..")
15   defines = []
17   public_deps = []
18   deps = [
19     "//base",
20     "//components/safe_json_parser:safe_json_parser_message_filter",
21     "//components/search_engines",
22     "//components/strings",
23     "//components/url_fixer",
24     "//content/public/common",
25     "//content/public/utility",
26     "//media",
27     "//skia",
28     "//third_party/libxml",
29     "//chrome:resources",
30     "//chrome:strings",
31     "//chrome/common",
32   ]
34   if (is_android) {
35     if (use_seccomp_bpf) {
36       deps += [ "//sandbox/linux:seccomp_bpf" ]
37       defines += [ "USE_SECCOMP_BPF" ]
38     }
39   } else {
40     deps += [
41       "//chrome/common:mojo_bindings",
42       "//net:net_utility_services",
43     ]
44     sources +=
45         rebase_path(gypi_values.chrome_utility_importer_sources, ".", "..")
46   }
48   if (enable_extensions) {
49     deps += [
50       "//chrome/common/extensions/api",
51       "//extensions/utility",
52     ]
54     public_deps += [ "//chrome/common/extensions/api" ]
56     sources +=
57         rebase_path(gypi_values.chrome_utility_extensions_sources, ".", "..")
58     sources +=
59         rebase_path(gypi_values.chrome_utility_shared_media_sources, ".", "..")
61     # Prevent wininet from loading in the renderer. http://crbug.com/460679
62     if (is_win) {
63       ldflags = [ "/DELAYLOAD:wininet.dll" ]
64     }
66     if (is_win || is_mac) {
67       sources +=
68           rebase_path(gypi_values.chrome_utility_win_mac_media_gallery_sources,
69                       ".",
70                       "..")
71       deps += [ "//components/wifi" ]
72     } else {
73       sources += [ "image_writer/image_writer_stub.cc" ]
74     }
76     if (is_mac) {
77       sources +=
78           rebase_path(gypi_values.chrome_utility_mac_media_gallery_sources,
79                       ".",
80                       "..")
81     }
83     # Linux should use system libexif
84     if (!is_linux) {
85       # TODO(thestig): Properly support building on Linux and ChromeOS.
86       deps += [ "//third_party/libexif" ]
87     }
88   }
90   if (use_nss_certs) {
91     sources += [
92       "importer/nss_decryptor_system_nss.cc",
93       "importer/nss_decryptor_system_nss.h",
94     ]
95     deps += [
96       "//crypto",
97       "//crypto:platform",
98     ]
99   }
101   if (!enable_print_preview) {
102     sources -= [
103       "printing_handler.cc",
104       "printing_handler.h",
105     ]
106   }
108   if (!enable_mdns) {
109     sources -= [
110       "local_discovery/service_discovery_message_handler.cc",
111       "local_discovery/service_discovery_message_handler.h",
112     ]
113   }