Chromium Code Reviews| 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..461a462a70c987ee865be847c5760c0391cd63a7 |
| --- /dev/null |
| +++ b/services/resource_coordinator/public/interfaces/service_callbacks.mojom |
| @@ -0,0 +1,25 @@ |
| +// 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 ResourceCoordinatorService (resource_coordinator) |
| +// due to software layering issues. For example (and the reason for this interface), |
| +// the UKM mojo interface lives within the content_browser service which is not accesible |
|
oystein (OOO til 10th of July)
2017/06/22 20:27:02
s/accesible/accessible/
I'd reword this a little
matthalp
2017/06/22 22:59:31
Done. Let me know if this could be improved furthe
|
| +// to anything within services/* as content_browser corresponds to code within chrome/*. |
| +// As a result, ServiceCallbacks interface is strategically called within content_browser |
| +// to pass in the initialized UkmRecorderInterfacePtr. |
| +interface ServiceCallbacks { |
| + // Checks to see if the resource_coordinator service is already active. Any call to |
| + // EnsureUkmRecorderInterface should be enclosed in the callback and called only |
| + // when active == true to avoid creating an excessive number of UkmRecorderInterface |
| + // mojo connections as the resource_coordinator service 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); |
| +}; |