| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 std::make_pair(content_handler_package, qualifier); | 65 std::make_pair(content_handler_package, qualifier); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void PackageManagerImpl::SetApplicationManager(ApplicationManager* manager) { | 68 void PackageManagerImpl::SetApplicationManager(ApplicationManager* manager) { |
| 69 application_manager_ = manager; | 69 application_manager_ = manager; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void PackageManagerImpl::FetchRequest( | 72 void PackageManagerImpl::FetchRequest( |
| 73 URLRequestPtr request, | 73 URLRequestPtr request, |
| 74 const Fetcher::FetchCallback& loader_callback) { | 74 const Fetcher::FetchCallback& loader_callback) { |
| 75 GURL url(request->url); | 75 GURL url(request->url.get()); |
| 76 if (url.SchemeIs(AboutFetcher::kAboutScheme)) { | 76 if (url.SchemeIs(AboutFetcher::kAboutScheme)) { |
| 77 AboutFetcher::Start(url, loader_callback); | 77 AboutFetcher::Start(url, loader_callback); |
| 78 return; | 78 return; |
| 79 } | 79 } |
| 80 | 80 |
| 81 if (url.SchemeIs(url::kDataScheme)) { | 81 if (url.SchemeIs(url::kDataScheme)) { |
| 82 DataFetcher::Start(url, loader_callback); | 82 DataFetcher::Start(url, loader_callback); |
| 83 return; | 83 return; |
| 84 } | 84 } |
| 85 | 85 |
| (...skipping 132 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 |