1# Copyright 2019 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.
4
5import("//third_party/protobuf/proto_library.gni")
6
7assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos")
8
9component("account_manager") {
10  sources = [
11    "account_manager.cc",
12    "account_manager.h",
13    "account_manager_facade_ash.cc",
14    "account_manager_facade_ash.h",
15    "account_manager_factory.cc",
16    "account_manager_factory.h",
17  ]
18
19  public_deps = [
20    ":account_manager_proto",
21    "//components/account_manager_core:account_manager_core",
22  ]
23
24  deps = [
25    "//base",
26    "//chromeos/constants",
27    "//components/prefs:prefs",
28    "//google_apis",
29    "//net",
30    "//services/network/public/cpp:cpp",
31  ]
32
33  defines = [ "IS_ACCOUNT_MANAGER_IMPL" ]
34}
35
36source_set("unit_tests") {
37  testonly = true
38  sources = [ "account_manager_unittest.cc" ]
39
40  deps = [
41    ":account_manager",
42    "//base",
43    "//base/test:test_support",
44    "//components/prefs:test_support",
45    "//net",
46    "//services/network:test_support",
47    "//services/network/public/cpp:cpp",
48    "//testing/gmock",
49    "//testing/gtest",
50  ]
51}
52
53proto_library("account_manager_proto") {
54  visibility = [ ":*" ]
55  sources = [ "tokens.proto" ]
56
57  proto_out_dir = "chromeos/components/account_manager"
58}
59