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

Unified Diff: services/dart/content_handler_main.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.cc ('k') | services/java_handler/java_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/dart/content_handler_main.cc
diff --git a/services/dart/content_handler_main.cc b/services/dart/content_handler_main.cc
index 957e690662bd325bf5cbc1a95e898e28780d2a88..aafa2b65f287848fa8abd33ad8fbe1c057c20969 100644
--- a/services/dart/content_handler_main.cc
+++ b/services/dart/content_handler_main.cc
@@ -135,8 +135,6 @@ class DartContentHandlerApp : public mojo::ApplicationDelegate {
DartContentHandlerApp()
: content_handler_(this, false),
strict_content_handler_(this, true),
- content_handler_factory_(&content_handler_),
- strict_content_handler_factory_(&strict_content_handler_),
service_connector_(nullptr),
default_strict_(false),
run_on_message_loop_(false) {}
@@ -242,10 +240,12 @@ class DartContentHandlerApp : public mojo::ApplicationDelegate {
service_provider_impl->connection_context().connection_url);
if (default_strict_ || strict) {
service_provider_impl->AddService<mojo::ContentHandler>(
- strict_content_handler_factory_.GetInterfaceRequestHandler());
+ mojo::ContentHandlerFactory::GetInterfaceRequestHandler(
+ &strict_content_handler_));
} else {
service_provider_impl->AddService<mojo::ContentHandler>(
- content_handler_factory_.GetInterfaceRequestHandler());
+ mojo::ContentHandlerFactory::GetInterfaceRequestHandler(
+ &content_handler_));
}
return true;
}
@@ -253,8 +253,6 @@ class DartContentHandlerApp : public mojo::ApplicationDelegate {
mojo::TracingImpl tracing_;
DartContentHandler content_handler_;
DartContentHandler strict_content_handler_;
- mojo::ContentHandlerFactory content_handler_factory_;
- mojo::ContentHandlerFactory strict_content_handler_factory_;
mojo::URLResponseDiskCachePtr url_response_disk_cache_;
ContentHandlerAppServiceConnector* service_connector_;
DartTracingImpl dart_tracing_;
« no previous file with comments | « mojo/application/content_handler_factory.cc ('k') | services/java_handler/java_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698