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

Unified Diff: services/python/content_handler/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 | « services/nacl/sfi/content_handler_main.cc ('k') | shell/android/android_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/python/content_handler/content_handler_main.cc
diff --git a/services/python/content_handler/content_handler_main.cc b/services/python/content_handler/content_handler_main.cc
index 04c9045ac98dc9734ef054a85bbf36e04505902e..383f4b378a76e042cbb3a04116e88811673f6e58 100644
--- a/services/python/content_handler/content_handler_main.cc
+++ b/services/python/content_handler/content_handler_main.cc
@@ -204,10 +204,7 @@ class PythonContentHandler : public ContentHandlerFactory::Delegate {
class PythonContentHandlerApp : public ApplicationDelegate {
public:
PythonContentHandlerApp()
- : content_handler_(false),
- debug_content_handler_(true),
- content_handler_factory_(&content_handler_),
- debug_content_handler_factory_(&debug_content_handler_) {}
+ : content_handler_(false), debug_content_handler_(true) {}
private:
// Overridden from ApplicationDelegate:
@@ -215,10 +212,11 @@ class PythonContentHandlerApp : public ApplicationDelegate {
mojo::ServiceProviderImpl* service_provider_impl) override {
if (IsDebug(service_provider_impl->connection_context().connection_url)) {
service_provider_impl->AddService<mojo::ContentHandler>(
- debug_content_handler_factory_.GetInterfaceRequestHandler());
+ ContentHandlerFactory::GetInterfaceRequestHandler(
+ &debug_content_handler_));
} else {
service_provider_impl->AddService<mojo::ContentHandler>(
- content_handler_factory_.GetInterfaceRequestHandler());
+ ContentHandlerFactory::GetInterfaceRequestHandler(&content_handler_));
}
return true;
}
@@ -236,8 +234,6 @@ class PythonContentHandlerApp : public ApplicationDelegate {
PythonContentHandler content_handler_;
PythonContentHandler debug_content_handler_;
- ContentHandlerFactory content_handler_factory_;
- ContentHandlerFactory debug_content_handler_factory_;
DISALLOW_COPY_AND_ASSIGN(PythonContentHandlerApp);
};
« no previous file with comments | « services/nacl/sfi/content_handler_main.cc ('k') | shell/android/android_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698