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

Unified Diff: mojo/shell/profile_service_loader.cc

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simplify the profile service loader / impl Created 6 years, 5 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: mojo/shell/profile_service_loader.cc
diff --git a/mojo/shell/profile_service_loader.cc b/mojo/shell/profile_service_loader.cc
index 741d2f21c479ca1f15b6e2fa7c02c81f7bcae232..3263c68cde0c3ee073f0cabbd889ccd59f3196e9 100644
--- a/mojo/shell/profile_service_loader.cc
+++ b/mojo/shell/profile_service_loader.cc
@@ -7,7 +7,6 @@
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/services/profile/profile_service_impl.h"
namespace mojo {
namespace shell {
@@ -37,9 +36,17 @@ void ProfileServiceLoader::OnServiceError(ServiceManager* manager,
bool ProfileServiceLoader::ConfigureIncomingConnection(
ApplicationConnection* connection) {
- connection->AddService<ProfileServiceImpl>();
+ connection->AddServiceProvider(this);
return true;
}
+void ProfileServiceLoader::BindToRequest(
+ ApplicationConnection* connection,
+ InterfaceRequest<ProfileService> request) {
+ // We can bind all requests to the same ProfileServiceImpl since there is no
+ // client for ProfileService.
+ mojo::BindToRequest(&impl_, &request);
jamesr 2014/07/11 00:44:07 check out this trick. since we're in control of t
+}
+
} // namespace shell
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698