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

Unified Diff: components/invalidation/BUILD.gn

Issue 459513002: Massive refactor of the Android invalidation code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A couple GN fixes. Created 6 years, 3 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 | « components/invalidation.gypi ('k') | components/invalidation/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/invalidation/BUILD.gn
diff --git a/components/invalidation/BUILD.gn b/components/invalidation/BUILD.gn
index c1e581b3da0c83764dd1d396acfcfb1d70a92a89..b39fe28fa3b5207160c2155d5528e8dc0b2708c5 100644
--- a/components/invalidation/BUILD.gn
+++ b/components/invalidation/BUILD.gn
@@ -1,6 +1,9 @@
# 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.
+if (is_android) {
+ import("//build/config/android/rules.gni")
+}
static_library("invalidation") {
sources = [
@@ -75,6 +78,15 @@ static_library("invalidation") {
"ticl_settings_provider.h",
]
}
+ if (is_android) {
+ sources += [
+ "android/component_jni_registrar.cc",
+ "android/component_jni_registrar.h",
+ "invalidation_service_android.cc",
+ "invalidation_service_android.h",
+ ]
+ deps += [ ":jni_headers" ]
+ }
public_deps = [
"//third_party/cacheinvalidation",
@@ -94,6 +106,21 @@ static_library("invalidation") {
]
}
+static_library("unittests") {
+ testonly = true
+ sources = []
+ deps = [
+ ":invalidation",
+ ":test_support",
+ ]
+ if (is_android) {
+ deps += [
+ ":javatests",
+ ":jni_headers",
+ ]
+ }
+}
+
static_library("test_support") {
testonly = true
sources = [
@@ -120,7 +147,11 @@ static_library("test_support") {
"p2p_invalidation_service.h",
]
}
-
+ if (is_android) {
+ deps += [
+ ":jni_headers",
+ ]
+ }
deps = [
"//base",
"//components/gcm_driver:test_support",
@@ -137,3 +168,27 @@ static_library("test_support") {
# "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
]
}
+
+if (is_android) {
+ static_library("java") {
+ deps = [
+ "//base",
+ "//sync:java",
+ "//third_party/cacheinvalidation:javalib",
+ ]
+ sources = [
+ ]
+ }
+ static_library("javatests") {
+ deps = [
+ ":java",
+ "//base:java_test_support",
+ ]
+ }
+ generate_jni("jni_headers") {
+ sources = [
+ "android/java/src/org/chromium/components/invalidation/InvalidationService.java",
+ ]
+ jni_package = "components/invalidation"
+ }
+}
« no previous file with comments | « components/invalidation.gypi ('k') | components/invalidation/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698