summaryrefslogtreecommitdiffstats
path: root/components/gcm_driver/instance_id/BUILD.gn
blob: 3e7792959a34673eee636bf1ac636ed596799b33 (plain)
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
# 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.

# GYP version: components/gcm_driver.gypi:instance_id_driver
source_set("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",
  ]

  deps = [
    "//base",
    "//components/gcm_driver",
    "//crypto",
  ]
  allow_circular_includes_from = [ "//components/gcm_driver" ]

  if (is_android) {
    sources -= [
      "instance_id_impl.cc",
      "instance_id_impl.h",
    ]
    sources += [
      "instance_id_android.cc",
      "instance_id_android.h",
    ]
  }
}

# GYP version: components/gcm_driver.gypi:instance_id_test_support
source_set("test_support") {
  testonly = true
  sources = [
    "fake_gcm_driver_for_instance_id.cc",
    "fake_gcm_driver_for_instance_id.h",
  ]

  deps = [
    ":instance_id",
    "//base",
    "//components/gcm_driver:test_support",
    "//testing/gtest",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "instance_id_driver_unittest.cc",
  ]

  deps = [
    ":instance_id",
    ":test_support",
    "//base",
    "//google_apis/gcm",
    "//testing/gtest",
  ]
}