| OLD | NEW |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # There should be only one memory instrumentaiton coordinator. It is currently | 5 # There should be only one resource coordinator. It is currently |
| 6 # in the browser process. So, only //content/browser should link to this target. | 6 # in the browser process. So, only //content/browser should link to this target. |
| 7 # Others modules should only need the public targets. | 7 # Others modules should only need the public targets. |
| 8 import("//services/catalog/public/tools/catalog.gni") |
| 9 import("//services/service_manager/public/cpp/service.gni") |
| 10 import("//services/service_manager/public/service_manifest.gni") |
| 11 import("//services/service_manager/public/tools/test/service_test.gni") |
| 12 |
| 8 source_set("lib") { | 13 source_set("lib") { |
| 9 sources = [ | 14 sources = [ |
| 15 "coordination_unit/coordination_unit_impl.cc", |
| 16 "coordination_unit/coordination_unit_impl.h", |
| 17 "coordination_unit/coordination_unit_provider_impl.cc", |
| 18 "coordination_unit/coordination_unit_provider_impl.h", |
| 10 "memory/coordinator/coordinator_impl.cc", | 19 "memory/coordinator/coordinator_impl.cc", |
| 11 "memory/coordinator/coordinator_impl.h", | 20 "memory/coordinator/coordinator_impl.h", |
| 21 "resource_coordinator_service.cc", |
| 22 "resource_coordinator_service.h", |
| 12 ] | 23 ] |
| 13 | 24 |
| 14 public_deps = [ | 25 public_deps = [ |
| 15 "//base", | 26 "//base", |
| 16 "//mojo/public/cpp/bindings", | 27 "//mojo/public/cpp/bindings", |
| 17 "//services/resource_coordinator/public/cpp:resource_coordinator_cpp", | 28 "//services/resource_coordinator/public/cpp:resource_coordinator_cpp", |
| 18 ] | 29 ] |
| 19 } | 30 } |
| 20 | 31 |
| 32 service_manifest("manifest") { |
| 33 name = "resource_coordinator" |
| 34 source = "manifest.json" |
| 35 } |
| 36 |
| 37 service("resource_coordinator") { |
| 38 sources = [ |
| 39 "service_main.cc", |
| 40 ] |
| 41 |
| 42 deps = [ |
| 43 ":lib", |
| 44 "//mojo/public/cpp/system", |
| 45 ] |
| 46 } |
| 47 |
| 21 source_set("tests") { | 48 source_set("tests") { |
| 22 testonly = true | 49 testonly = true |
| 23 | 50 |
| 24 sources = [ | 51 sources = [ |
| 52 "coordination_unit/coordination_unit_impl_unittest.cc", |
| 25 "memory/coordinator/coordinator_impl_unittest.cc", | 53 "memory/coordinator/coordinator_impl_unittest.cc", |
| 26 "public/cpp/memory/process_local_dump_manager_impl_unittest.cc", | 54 "public/cpp/memory/process_local_dump_manager_impl_unittest.cc", |
| 27 ] | 55 ] |
| 28 | 56 |
| 29 deps = [ | 57 deps = [ |
| 30 ":lib", | 58 ":lib", |
| 31 "//base", | 59 "//base", |
| 32 "//mojo/public/cpp/bindings", | 60 "//mojo/public/cpp/bindings", |
| 33 "//services/resource_coordinator/public/cpp:resource_coordinator_cpp", | 61 "//services/resource_coordinator/public/cpp:resource_coordinator_cpp", |
| 34 "//testing/gtest", | 62 "//testing/gtest", |
| 35 ] | 63 ] |
| 64 |
| 65 data_deps = [ |
| 66 ":lib", |
| 67 ] |
| 36 } | 68 } |
| 69 |
| 70 service_test("resource_coordinator_unittests") { |
| 71 testonly = true |
| 72 |
| 73 sources = [ |
| 74 "resource_coordinator_service_unittest.cc", |
| 75 ] |
| 76 |
| 77 catalog = ":resource_coordinator_unittests_catalog" |
| 78 |
| 79 deps = [ |
| 80 "//base", |
| 81 "//mojo/public/cpp/bindings", |
| 82 "//services/resource_coordinator/public/cpp:resource_coordinator_cpp", |
| 83 "//services/service_manager/public/cpp", |
| 84 "//services/service_manager/public/cpp:service_test_support", |
| 85 "//services/service_manager/public/interfaces", |
| 86 "//testing/gtest", |
| 87 ] |
| 88 |
| 89 data_deps = [ |
| 90 ":resource_coordinator", |
| 91 ] |
| 92 } |
| 93 |
| 94 service_manifest("unittest_manifest") { |
| 95 name = "resource_coordinator_unittests" |
| 96 source = "unittest_manifest.json" |
| 97 } |
| 98 |
| 99 catalog("resource_coordinator_unittests_catalog") { |
| 100 embedded_services = [ ":unittest_manifest" ] |
| 101 standalone_services = [ ":manifest" ] |
| 102 } |
| OLD | NEW |