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

Unified Diff: content/public/common/service_registry.h

Issue 1831173002: Scaffolding for Android implementation of PaymentRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo
Patch Set: Cleanup Created 4 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: content/public/common/service_registry.h
diff --git a/content/public/common/service_registry.h b/content/public/common/service_registry.h
index 41edc199ce7a78992a03e9e732b8f0e452a811f5..ec5a69271d2f7e025cb11969dbd551a44c9c9816 100644
--- a/content/public/common/service_registry.h
+++ b/content/public/common/service_registry.h
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/strings/string_piece.h"
+#include "base/supports_user_data.h"
#include "content/common/content_export.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
#include "mojo/public/cpp/bindings/interface_request.h"
@@ -22,9 +23,9 @@ namespace content {
// AddService to a paired remote ServiceRegistry and provides local access to
// services exposed by the remote ServiceRegistry through
// ConnectToRemoteService.
-class CONTENT_EXPORT ServiceRegistry {
+class CONTENT_EXPORT ServiceRegistry : private base::SupportsUserData {
ncarter (slow) 2016/04/05 18:22:40 For SupportsUserData, instead of private inheritan
public:
- virtual ~ServiceRegistry() {}
+ ~ServiceRegistry() override {}
// Make the service created by |service_factory| available to the remote
// ServiceProvider. In response to each request for a service,
@@ -73,6 +74,8 @@ class CONTENT_EXPORT ServiceRegistry {
virtual void ClearServiceOverridesForTesting() = 0;
private:
+ friend class ServiceRegistryAndroid;
+
template <typename Interface>
static void ForwardToServiceFactory(
const base::Callback<void(mojo::InterfaceRequest<Interface>)>

Powered by Google App Engine
This is Rietveld 408576698