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

Unified Diff: mojo/application/content_handler_factory.cc

Issue 1993053002: Simplify ContentHandlerFactory a bit. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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
« no previous file with comments | « mojo/application/content_handler_factory.h ('k') | services/dart/content_handler_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/content_handler_factory.cc
diff --git a/mojo/application/content_handler_factory.cc b/mojo/application/content_handler_factory.cc
index 8b104489a4fe7727f51db3c9db0807c6295dabc4..e27996adfa92b8343f773a59c3f2f743c185e25b 100644
--- a/mojo/application/content_handler_factory.cc
+++ b/mojo/application/content_handler_factory.cc
@@ -4,7 +4,7 @@
#include "mojo/application/content_handler_factory.h"
-#include <set>
+#include <map>
#include "base/bind.h"
#include "base/callback.h"
@@ -111,22 +111,12 @@ class ContentHandlerImpl : public ContentHandler {
} // namespace
-ContentHandlerFactory::ContentHandlerFactory(Delegate* delegate)
- : delegate_(delegate) {}
-
-ContentHandlerFactory::~ContentHandlerFactory() {}
-
-void ContentHandlerFactory::Create(
- const ConnectionContext& connection_context,
- InterfaceRequest<ContentHandler> content_handler_request) {
- new ContentHandlerImpl(delegate_, content_handler_request.Pass());
-}
-
+// static
ServiceProviderImpl::InterfaceRequestHandler<ContentHandler>
-ContentHandlerFactory::GetInterfaceRequestHandler() {
- return [this](const ConnectionContext& connection_context,
- InterfaceRequest<ContentHandler> content_handler_request) {
- Create(connection_context, content_handler_request.Pass());
+ContentHandlerFactory::GetInterfaceRequestHandler(Delegate* delegate) {
+ return [delegate](const ConnectionContext& connection_context,
+ InterfaceRequest<ContentHandler> content_handler_request) {
+ new ContentHandlerImpl(delegate, content_handler_request.Pass());
};
}
« no previous file with comments | « mojo/application/content_handler_factory.h ('k') | services/dart/content_handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698