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

Unified Diff: services/resource_coordinator/BUILD.gn

Issue 2798713002: Global Resource Coordinator: Basic service internals (Closed)
Patch Set: Created 3 years, 8 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
Index: services/resource_coordinator/BUILD.gn
diff --git a/services/resource_coordinator/BUILD.gn b/services/resource_coordinator/BUILD.gn
index bfa2df622f0071c9a3ac1112fb395028717dfcb1..55d127391853f3fda56467faf6ac899ff1f83cf4 100644
--- a/services/resource_coordinator/BUILD.gn
+++ b/services/resource_coordinator/BUILD.gn
@@ -2,13 +2,24 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# There should be only one memory instrumentaiton coordinator. It is currently
+# There should be only one resource coordinator. It is currently
# in the browser process. So, only //content/browser should link to this target.
# Others modules should only need the public targets.
+import("//services/catalog/public/tools/catalog.gni")
+import("//services/service_manager/public/cpp/service.gni")
+import("//services/service_manager/public/service_manifest.gni")
+import("//services/service_manager/public/tools/test/service_test.gni")
+
source_set("lib") {
sources = [
+ "coordination_unit/coordination_unit_impl.cc",
+ "coordination_unit/coordination_unit_impl.h",
+ "coordination_unit/coordination_unit_provider_impl.cc",
+ "coordination_unit/coordination_unit_provider_impl.h",
"memory/coordinator/coordinator_impl.cc",
"memory/coordinator/coordinator_impl.h",
+ "resource_coordinator_service.cc",
+ "resource_coordinator_service.h",
]
public_deps = [
@@ -17,12 +28,33 @@ source_set("lib") {
"//services/resource_coordinator/public/cpp",
"//services/resource_coordinator/public/interfaces",
]
+
+ data_deps = [
+ ":manifest",
+ ]
+}
+
+service_manifest("manifest") {
+ name = "resource_coordinator"
+ source = "manifest.json"
+}
+
+service("resource_coordinator") {
+ sources = [
+ "service_main.cc",
+ ]
+
+ deps = [
+ ":lib",
+ "//mojo/public/cpp/system",
+ ]
}
source_set("tests") {
testonly = true
sources = [
+ "coordination_unit/coordination_unit_impl_unittest.cc",
"memory/coordinator/coordinator_impl_unittest.cc",
"public/cpp/memory/memory_dump_manager_delegate_impl_unittest.cc",
]
@@ -36,3 +68,37 @@ source_set("tests") {
"//testing/gtest",
]
}
+
+service_test("resource_coordinator_unittests") {
+ sources = [
+ "resource_coordinator_service_unittest.cc",
+ ]
+
+ catalog = ":resource_coordinator_unittests_catalog"
+
+ deps = [
+ "//base",
+ "//mojo/public/cpp/bindings",
+ "//services/resource_coordinator/public/cpp",
+ "//services/resource_coordinator/public/interfaces",
+ "//services/service_manager/public/cpp",
+ "//services/service_manager/public/cpp:service_test_support",
+ "//services/service_manager/public/interfaces",
+ "//testing/gtest",
+ ]
+
+ data_deps = [
+ ":resource_coordinator",
+ "//content/shell:content_shell",
+ ]
+}
+
+service_manifest("unittest_manifest") {
+ name = "resource_coordinator_unittests"
+ source = "unittest_manifest.json"
+}
+
+catalog("resource_coordinator_unittests_catalog") {
+ embedded_services = [ ":unittest_manifest" ]
+ standalone_services = [ ":manifest" ]
+}

Powered by Google App Engine
This is Rietveld 408576698