| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mojo/shell/package_manager/package_manager_impl.h" | 5 #include "mojo/shell/package_manager/package_manager_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 target_url, | 122 target_url, |
| 123 target_filter, | 123 target_filter, |
| 124 &content_handler_identity, | 124 &content_handler_identity, |
| 125 &response)) { | 125 &response)) { |
| 126 ContentHandlerConnection* connection = | 126 ContentHandlerConnection* connection = |
| 127 GetContentHandler(content_handler_identity, source); | 127 GetContentHandler(content_handler_identity, source); |
| 128 connection->StartApplication(std::move(*application_request), | 128 connection->StartApplication(std::move(*application_request), |
| 129 std::move(response)); | 129 std::move(response)); |
| 130 return connection->id(); | 130 return connection->id(); |
| 131 } | 131 } |
| 132 return Shell::kInvalidContentHandlerID; | 132 return Shell::kInvalidApplicationID; |
| 133 } | 133 } |
| 134 | 134 |
| 135 GURL PackageManagerImpl::ResolveURL(const GURL& url) { | 135 GURL PackageManagerImpl::ResolveURL(const GURL& url) { |
| 136 return url_resolver_.get() ? url_resolver_->ResolveMojoURL(url) : url; | 136 return url_resolver_.get() ? url_resolver_->ResolveMojoURL(url) : url; |
| 137 } | 137 } |
| 138 | 138 |
| 139 bool PackageManagerImpl::ShouldHandleWithContentHandler( | 139 bool PackageManagerImpl::ShouldHandleWithContentHandler( |
| 140 Fetcher* fetcher, | 140 Fetcher* fetcher, |
| 141 const GURL& target_url, | 141 const GURL& target_url, |
| 142 const CapabilityFilter& target_filter, | 142 const CapabilityFilter& target_filter, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 void PackageManagerImpl::OnContentHandlerConnectionClosed( | 218 void PackageManagerImpl::OnContentHandlerConnectionClosed( |
| 219 ContentHandlerConnection* connection) { | 219 ContentHandlerConnection* connection) { |
| 220 // Remove the mapping. | 220 // Remove the mapping. |
| 221 auto it = identity_to_content_handler_.find(connection->identity()); | 221 auto it = identity_to_content_handler_.find(connection->identity()); |
| 222 DCHECK(it != identity_to_content_handler_.end()); | 222 DCHECK(it != identity_to_content_handler_.end()); |
| 223 identity_to_content_handler_.erase(it); | 223 identity_to_content_handler_.erase(it); |
| 224 } | 224 } |
| 225 | 225 |
| 226 } // namespace shell | 226 } // namespace shell |
| 227 } // namespace mojo | 227 } // namespace mojo |
| OLD | NEW |