| Index: mojo/service_manager/background_shell_service_loader.cc
|
| diff --git a/mojo/service_manager/background_shell_service_loader.cc b/mojo/service_manager/background_shell_service_loader.cc
|
| index 6d7a2582108628a29c9a728b9be3886ffe978b46..eab472769c22e71187b07e0793fa3dbe625a304f 100644
|
| --- a/mojo/service_manager/background_shell_service_loader.cc
|
| +++ b/mojo/service_manager/background_shell_service_loader.cc
|
| @@ -18,7 +18,9 @@ class BackgroundShellServiceLoader::BackgroundLoader {
|
| void LoadService(ServiceManager* manager,
|
| const GURL& url,
|
| ScopedMessagePipeHandle shell_handle) {
|
| - loader_->LoadService(manager, url, shell_handle.Pass());
|
| + scoped_refptr<LoadServiceCallbacks> callbacks(
|
| + new ServiceLoader::SimpleLoadServiceCallbacks(shell_handle.Pass()));
|
| + loader_->LoadService(manager, url, callbacks);
|
| }
|
|
|
| void OnServiceError(ServiceManager* manager, const GURL& url) {
|
| @@ -54,7 +56,11 @@ BackgroundShellServiceLoader::~BackgroundShellServiceLoader() {
|
| void BackgroundShellServiceLoader::LoadService(
|
| ServiceManager* manager,
|
| const GURL& url,
|
| - ScopedMessagePipeHandle shell_handle) {
|
| + scoped_refptr<LoadServiceCallbacks> callbacks) {
|
| + ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication();
|
| + if (!shell_handle.is_valid())
|
| + return;
|
| +
|
| if (!thread_) {
|
| // TODO(tim): It'd be nice if we could just have each LoadService call
|
| // result in a new thread like DynamicService{Loader, Runner}. But some
|
|
|