| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 #include "mojo/service_manager/service_manager.h" | 7 #include "mojo/service_manager/service_manager.h" |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "mojo/public/bindings/allocation_scope.h" | 12 #include "mojo/public/cpp/bindings/allocation_scope.h" |
| 13 #include "mojo/public/bindings/error_handler.h" | 13 #include "mojo/public/cpp/bindings/error_handler.h" |
| 14 #include "mojo/public/bindings/remote_ptr.h" | 14 #include "mojo/public/cpp/bindings/remote_ptr.h" |
| 15 #include "mojo/service_manager/service_loader.h" | 15 #include "mojo/service_manager/service_loader.h" |
| 16 | 16 |
| 17 namespace mojo { | 17 namespace mojo { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 // Used by TestAPI. | 20 // Used by TestAPI. |
| 21 bool has_created_instance = false; | 21 bool has_created_instance = false; |
| 22 } | 22 } |
| 23 | 23 |
| 24 class ServiceManager::ServiceFactory : public Shell, public ErrorHandler { | 24 class ServiceManager::ServiceFactory : public Shell, public ErrorHandler { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 void ServiceManager::OnServiceFactoryError(ServiceFactory* service_factory) { | 129 void ServiceManager::OnServiceFactoryError(ServiceFactory* service_factory) { |
| 130 const GURL url = service_factory->url(); | 130 const GURL url = service_factory->url(); |
| 131 URLToServiceFactoryMap::iterator it = url_to_service_factory_.find(url); | 131 URLToServiceFactoryMap::iterator it = url_to_service_factory_.find(url); |
| 132 DCHECK(it != url_to_service_factory_.end()); | 132 DCHECK(it != url_to_service_factory_.end()); |
| 133 delete it->second; | 133 delete it->second; |
| 134 url_to_service_factory_.erase(it); | 134 url_to_service_factory_.erase(it); |
| 135 GetLoaderForURL(url)->OnServiceError(this, url); | 135 GetLoaderForURL(url)->OnServiceError(this, url); |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace mojo | 138 } // namespace mojo |
| OLD | NEW |