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

Unified Diff: services/resource_coordinator/resource_coordinator_service.cc

Issue 2965553002: [GRC] Add Tab-scoped Coordination Unit Graph Observer (Closed)
Patch Set: Change observer name Created 3 years, 6 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
« no previous file with comments | « services/resource_coordinator/resource_coordinator_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/resource_coordinator/resource_coordinator_service.cc
diff --git a/services/resource_coordinator/resource_coordinator_service.cc b/services/resource_coordinator/resource_coordinator_service.cc
index 1b879a93a81c4ca9c1f70fc666552978efd69b34..12a38fa98a750277b16723c2e4c8caba12c740a8 100644
--- a/services/resource_coordinator/resource_coordinator_service.cc
+++ b/services/resource_coordinator/resource_coordinator_service.cc
@@ -6,13 +6,22 @@
#include <utility>
+#include "base/memory/ptr_util.h"
+#include "services/resource_coordinator/coordination_unit/tab_signal_generator.h"
#include "services/resource_coordinator/service_callbacks_impl.h"
#include "services/service_manager/public/cpp/service_context.h"
namespace resource_coordinator {
std::unique_ptr<service_manager::Service> ResourceCoordinatorService::Create() {
- return base::MakeUnique<ResourceCoordinatorService>();
+ auto resource_coordinator_service =
+ base::MakeUnique<ResourceCoordinatorService>();
+
+ // Register new |CoordinationUnitGraphObserver| implementations here.
+ resource_coordinator_service->coordination_unit_manager()->RegisterObserver(
+ base::MakeUnique<TabSignalGenerator>());
+
+ return resource_coordinator_service;
}
ResourceCoordinatorService::ResourceCoordinatorService()
« no previous file with comments | « services/resource_coordinator/resource_coordinator_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698