OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/url_loader_factory_getter.h" | 5 #include "content/browser/url_loader_factory_getter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "content/browser/storage_partition_impl.h" | 8 #include "content/browser/storage_partition_impl.h" |
9 #include "content/common/network_service.mojom.h" | 9 #include "content/public/common/network_service.mojom.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 URLLoaderFactoryGetter::URLLoaderFactoryGetter() {} | 13 URLLoaderFactoryGetter::URLLoaderFactoryGetter() {} |
14 | 14 |
15 void URLLoaderFactoryGetter::Initialize(StoragePartitionImpl* partition) { | 15 void URLLoaderFactoryGetter::Initialize(StoragePartitionImpl* partition) { |
16 mojom::URLLoaderFactoryPtr network_factory; | 16 mojom::URLLoaderFactoryPtr network_factory; |
17 partition->network_context()->CreateURLLoaderFactory( | 17 partition->network_context()->CreateURLLoaderFactory( |
18 MakeRequest(&network_factory), 0); | 18 MakeRequest(&network_factory), 0); |
19 | 19 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 network_factory_.Bind(std::move(network_factory)); | 57 network_factory_.Bind(std::move(network_factory)); |
58 blob_factory_.Bind(std::move(blob_factory)); | 58 blob_factory_.Bind(std::move(blob_factory)); |
59 } | 59 } |
60 | 60 |
61 void URLLoaderFactoryGetter::SetTestNetworkFactoryOnIOThread( | 61 void URLLoaderFactoryGetter::SetTestNetworkFactoryOnIOThread( |
62 mojom::URLLoaderFactoryPtrInfo test_factory) { | 62 mojom::URLLoaderFactoryPtrInfo test_factory) { |
63 test_factory_.Bind(std::move(test_factory)); | 63 test_factory_.Bind(std::move(test_factory)); |
64 } | 64 } |
65 | 65 |
66 } // namespace content | 66 } // namespace content |
OLD | NEW |