Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / mojo / services / network / BUILD.gn
blob54844029150371711a69581d52961a8651790a88
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("//third_party/mojo/src/mojo/public/mojo_application.gni")
7 if (is_android) {
8   import("//build/config/android/rules.gni")
10   java_library_path = "$target_out_dir/java_library.dex.jar"
12   mojo_android_application("network") {
13     output_name = "network_service"
14     input_so = "$root_out_dir/lib.stripped/libnetwork_service.so"
15     input_dex_jar = java_library_path
16   }
18   shared_library("native_library") {
19     output_name = "network_service"
21     sources = [
22       "android_hooks.cc",
23     ]
25     deps = [
26       ":sources",
27       "//base",
28       "//net",
29     ]
30   }
32   android_standalone_library("java_library") {
33     dex_path = java_library_path
35     deps = [
36       "//net/android:net_java",
37     ]
38   }
39 } else {
40   mojo_native_application("network") {
41     output_name = "network_service"
43     deps = [
44       ":sources",
45     ]
46   }
49 source_set("lib") {
50   sources = [
51     "cookie_store_impl.cc",
52     "cookie_store_impl.h",
53     "net_adapters.cc",
54     "net_adapters.h",
55     "net_address_type_converters.cc",
56     "net_address_type_converters.h",
57     "network_context.cc",
58     "network_context.h",
59     "network_service_impl.cc",
60     "network_service_impl.h",
61     "tcp_bound_socket_impl.cc",
62     "tcp_bound_socket_impl.h",
63     "tcp_connected_socket_impl.cc",
64     "tcp_connected_socket_impl.h",
65     "tcp_server_socket_impl.cc",
66     "tcp_server_socket_impl.h",
67     "udp_socket_impl.cc",
68     "udp_socket_impl.h",
69     "url_loader_impl.cc",
70     "url_loader_impl.h",
71     "web_socket_impl.cc",
72     "web_socket_impl.h",
73   ]
75   deps = [
76     "//base",
77     "//mojo/application",
78     "//mojo/common",
79     "//mojo/environment:chromium",
80     "//mojo/services/network/public/cpp",
81     "//mojo/services/network/public/interfaces",
82     "//net",
83     "//third_party/mojo/src/mojo/public/cpp/bindings",
84     "//url",
85   ]
88 source_set("sources") {
89   visibility = [ ":*" ]
91   sources = [
92     "network_service.cc",
93   ]
95   deps = [
96     ":lib",
97     "//base",
98     "//mojo/application",
99     "//mojo/services/network/public/cpp",
100     "//mojo/services/network/public/interfaces",
101     "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
102     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
103   ]
106 mojo_native_application("apptests") {
107   output_name = "network_service_apptests"
108   testonly = true
110   sources = [
111     "udp_socket_apptest.cc",
112     "url_loader_impl_apptest.cc",
113   ]
115   deps = [
116     ":lib",
117     ":network",
118     "//base",
119     "//mojo/application",
120     "//mojo/application:test_support",
121     "//mojo/common",
122     "//mojo/services/network/public/cpp",
123     "//mojo/services/network/public/interfaces",
124     "//net",
125     "//net:test_support",
126     "//testing/gtest",
127     "//third_party/mojo/src/mojo/public/cpp/bindings",
128     "//third_party/mojo/src/mojo/public/cpp/bindings:callback",
129   ]