forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
79 lines (70 loc) · 1.64 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# 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.
import("//components/gcm_driver/config.gni")
static_library("instance_id") {
sources = [
"instance_id.cc",
"instance_id.h",
"instance_id_driver.cc",
"instance_id_driver.h",
"instance_id_impl.cc",
"instance_id_impl.h",
"instance_id_profile_service.cc",
"instance_id_profile_service.h",
]
deps = [
"//base",
"//components/gcm_driver:gcm_buildflags",
"//components/keyed_service/core:core",
"//components/prefs:prefs",
"//crypto",
"//services/network/public/mojom",
]
if (use_gcm_from_platform) {
sources -= [
"instance_id_impl.cc",
"instance_id_impl.h",
]
sources += [
"instance_id_android.cc",
"instance_id_android.h",
]
deps += [ "android:jni_headers" ]
}
}
static_library("test_support") {
testonly = true
sources = [
"fake_gcm_driver_for_instance_id.cc",
"fake_gcm_driver_for_instance_id.h",
"scoped_use_fake_instance_id_android.cc",
"scoped_use_fake_instance_id_android.h",
]
public_deps = [
":instance_id",
]
deps = [
"//base",
"//components/gcm_driver",
"//testing/gtest",
]
if (is_android) {
deps += [ "android:test_support_jni_headers" ]
}
}
source_set("unit_tests") {
testonly = true
sources = [
"instance_id_driver_unittest.cc",
]
deps = [
":instance_id",
":test_support",
"//base",
"//components/gcm_driver:gcm_buildflags",
"//google_apis/gcm",
"//net:test_support",
"//testing/gtest",
]
}