OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/loader/url_loader_factory_impl.h" | 5 #include "content/browser/loader/url_loader_factory_impl.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 8 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
9 #include "content/browser/loader/resource_requester_info.h" | 9 #include "content/browser/loader/resource_requester_info.h" |
10 #include "content/common/resource_request.h" | |
11 #include "content/common/url_loader.mojom.h" | 10 #include "content/common/url_loader.mojom.h" |
| 11 #include "content/public/common/resource_request.h" |
12 #include "mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 void DispatchSyncLoadResult(URLLoaderFactoryImpl::SyncLoadCallback callback, | 18 void DispatchSyncLoadResult(URLLoaderFactoryImpl::SyncLoadCallback callback, |
19 const SyncLoadResult* result) { | 19 const SyncLoadResult* result) { |
20 // |result| can be null when a loading task is aborted unexpectedly. Reply | 20 // |result| can be null when a loading task is aborted unexpectedly. Reply |
21 // with a failure result on that case. | 21 // with a failure result on that case. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void URLLoaderFactoryImpl::Create( | 107 void URLLoaderFactoryImpl::Create( |
108 scoped_refptr<ResourceRequesterInfo> requester_info, | 108 scoped_refptr<ResourceRequesterInfo> requester_info, |
109 mojo::InterfaceRequest<mojom::URLLoaderFactory> request, | 109 mojo::InterfaceRequest<mojom::URLLoaderFactory> request, |
110 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_runner) { | 110 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_runner) { |
111 mojo::MakeStrongBinding(base::WrapUnique(new URLLoaderFactoryImpl( | 111 mojo::MakeStrongBinding(base::WrapUnique(new URLLoaderFactoryImpl( |
112 std::move(requester_info), io_thread_runner)), | 112 std::move(requester_info), io_thread_runner)), |
113 std::move(request)); | 113 std::move(request)); |
114 } | 114 } |
115 | 115 |
116 } // namespace content | 116 } // namespace content |
OLD | NEW |