Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1305)

Unified Diff: mojo/services/network/BUILD.gn

Issue 858093002: Update the network service from the Mojo repo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/services/network/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/BUILD.gn
diff --git a/mojo/services/network/BUILD.gn b/mojo/services/network/BUILD.gn
index 856525ee60c42660c6ef31764a26becb19a907ab..477005f5e00e1e8138748801ab32d2151826c960 100644
--- a/mojo/services/network/BUILD.gn
+++ b/mojo/services/network/BUILD.gn
@@ -2,37 +2,52 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//third_party/mojo/src/mojo/public/mojo_application.gni")
+import("../mojo_sdk_root.gni")
+import("$mojo_sdk_root/mojo/public/mojo_application.gni")
-mojo_native_application("network") {
- output_name = "network_service"
+if (is_android) {
+ import("//build/config/android/rules.gni")
- deps = [
- ":lib",
- "//base",
- "//mojo/application",
- "//mojo/services/network/public/interfaces",
- "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
- "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
- ]
+ java_library_path = "$target_out_dir/java_library.dex.jar"
- sources = [
- "network_service.cc",
- ]
+ mojo_android_application("network") {
+ output_name = "network_service"
+ input_so = "$root_out_dir/lib.stripped/libnetwork_service.so"
+ input_dex_jar = java_library_path
+ }
+
+ shared_library("native_library") {
+ output_name = "network_service"
+
+ sources = [
+ "android_hooks.cc",
+ ]
+
+ deps = [
+ ":sources",
+ "//base",
+ "//net",
+ ]
+ }
+
+ android_standalone_library("java_library") {
+ dex_path = java_library_path
+
+ deps = [
+ "//net/android:net_java",
+ ]
+ }
+} else {
+ mojo_native_application("network") {
+ output_name = "network_service"
+
+ deps = [
+ ":sources",
+ ]
+ }
}
source_set("lib") {
- deps = [
- "//base",
- "//mojo/application",
- "//mojo/common",
- "//mojo/environment:chromium",
- "//mojo/services/network/public/cpp",
- "//mojo/services/network/public/interfaces",
- "//net",
- "//url",
- ]
-
sources = [
"cookie_store_impl.cc",
"cookie_store_impl.h",
@@ -57,4 +72,60 @@ source_set("lib") {
"web_socket_impl.cc",
"web_socket_impl.h",
]
+
+ deps = [
+ "$mojo_sdk_root/mojo/public/cpp/bindings",
+ "//base",
+ "//mojo/application",
+ "//mojo/common",
+ "//mojo/environment:chromium",
+ "//mojo/services/network/public/cpp",
+ "//mojo/services/network/public/interfaces",
+ "//net",
+ "//url",
+ ]
+}
+
+source_set("sources") {
+ visibility = [ ":*" ]
+
+ sources = [
+ "network_service.cc",
+ ]
+
+ deps = [
+ ":lib",
+ "$mojo_sdk_root/mojo/public/c/system:for_shared_library",
+ "$mojo_sdk_root/mojo/public/cpp/bindings:bindings",
+ "//base",
+ "//mojo/application",
+ "//mojo/services/network/public/cpp",
+ "//mojo/services/network/public/interfaces",
+ ]
+}
+
+mojo_native_application("apptests") {
+ output_name = "network_service_apptests"
+ testonly = true
+
+ sources = [
+ "udp_socket_apptest.cc",
+ "url_loader_impl_apptest.cc",
+ ]
+
+ deps = [
+ ":lib",
+ ":network",
+ "$mojo_sdk_root/mojo/public/cpp/bindings",
+ "$mojo_sdk_root/mojo/public/cpp/bindings:callback",
+ "//base",
+ "//mojo/application",
+ "//mojo/application:test_support",
+ "//mojo/common",
+ "//mojo/services/network/public/cpp",
+ "//mojo/services/network/public/interfaces",
+ "//net",
+ "//net:test_support",
+ "//testing/gtest",
+ ]
}
« no previous file with comments | « no previous file | mojo/services/network/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698