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

Unified Diff: services/resource_coordinator/public/interfaces/service_callbacks.mojom

Issue 2938443002: [GRC] UKM Support (Closed)
Patch Set: Address reviewer feedback 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
Index: services/resource_coordinator/public/interfaces/service_callbacks.mojom
diff --git a/services/resource_coordinator/public/interfaces/service_callbacks.mojom b/services/resource_coordinator/public/interfaces/service_callbacks.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..62d066c06cddde6f140e6ed16e2949a1f849733e
--- /dev/null
+++ b/services/resource_coordinator/public/interfaces/service_callbacks.mojom
@@ -0,0 +1,29 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module resource_coordinator.mojom;
+
+import "components/ukm/public/interfaces/ukm_interface.mojom";
+
+// This class is intended to provide an interface to register mojo interfaces
+// that are not currently accessible to the resource_coordinator service. For
+// example (and the reason for this interface), the UKM mojo interface is
+// accessible to the resource_coordinator code, as its in //components/,
+// but it's bound within the content_browser service. Therefore, the
+// content_browser service needs to bind to it and pass the message pointer
+// (i.e. message pipe) to the resource_coordinator service. As a result, the
+// ServiceCallbacks interface is strategically called within content_browser
+// to pass in the initialized UkmRecorderInterfacePtr to the
+// resource_coordinator.
+interface ServiceCallbacks {
+ // Checks to see if the resource_coordinator service is already active. Any
+ // call to EnsureUkmRecorderInterface should enclosed in the passed callback
+ // and called only when active == true to avoid creating an unecessary
+ // UkmRecorderInterface mojo connections as resource_coordinator will ignore
+ // the UkmRecorderInterface passed into EnsureUkmRecorderInterface if it is
+ // already active.
+ IsUkmRecorderInterfaceInitialized() => (bool ukm_recorder_already_initialized);
+
+ SetUkmRecorderInterface(ukm.mojom.UkmRecorderInterface ukm_recorder_interface);
+};
« no previous file with comments | « services/resource_coordinator/public/interfaces/BUILD.gn ('k') | services/resource_coordinator/resource_coordinator_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698