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

Unified Diff: content/browser/service_manager/service_manager_context.cc

Issue 2871353002: GRC: Added Tab coordination units behind a feature flag (Closed)
Patch Set: WIP Created 3 years, 7 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: content/browser/service_manager/service_manager_context.cc
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc
index eeb813967f87603be8ade337d8b31273a35f2067..28ca9faac457da040be5faafa86574b44147e494 100644
--- a/content/browser/service_manager/service_manager_context.cc
+++ b/content/browser/service_manager/service_manager_context.cc
@@ -42,6 +42,9 @@
#include "services/data_decoder/public/interfaces/constants.mojom.h"
#include "services/device/device_service.h"
#include "services/device/public/interfaces/constants.mojom.h"
+#include "services/resource_coordinator/public/cpp/resource_coordinator_features.h"
+#include "services/resource_coordinator/public/interfaces/service_constants.mojom.h"
+#include "services/resource_coordinator/resource_coordinator_service.h"
#include "services/service_manager/connect_params.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/service.h"
@@ -305,6 +308,14 @@ ServiceManagerContext::ServiceManagerContext() {
packaged_services_connection_->AddEmbeddedService(device::mojom::kServiceName,
device_info);
+ if (base::FeatureList::IsEnabled(features::kGlobalResourceCoordinator)) {
+ ServiceInfo resource_coordinator_info;
+ resource_coordinator_info.factory =
+ base::Bind(&resource_coordinator::ResourceCoordinatorService::Create);
+ packaged_services_connection_->AddEmbeddedService(
+ resource_coordinator::mojom::kServiceName, resource_coordinator_info);
+ }
+
ContentBrowserClient::StaticServiceMap services;
GetContentClient()->browser()->RegisterInProcessServices(&services);
for (const auto& entry : services) {

Powered by Google App Engine
This is Rietveld 408576698