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 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ |
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ | 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "content/browser/loader/navigation_url_loader.h" | 10 #include "content/browser/loader/navigation_url_loader.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void OnUploadProgress(int64_t current_position, | 59 void OnUploadProgress(int64_t current_position, |
60 int64_t total_size, | 60 int64_t total_size, |
61 OnUploadProgressCallback callback) override; | 61 OnUploadProgressCallback callback) override; |
62 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; | 62 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; |
63 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; | 63 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; |
64 void OnStartLoadingResponseBody( | 64 void OnStartLoadingResponseBody( |
65 mojo::ScopedDataPipeConsumerHandle body) override; | 65 mojo::ScopedDataPipeConsumerHandle body) override; |
66 void OnComplete( | 66 void OnComplete( |
67 const ResourceRequestCompletionStatus& completion_status) override; | 67 const ResourceRequestCompletionStatus& completion_status) override; |
68 | 68 |
69 // Initiates the request. | |
70 void StartURLRequest(std::unique_ptr<ResourceRequest> request); | |
71 | |
72 private: | 69 private: |
73 void ConnectURLLoaderFactory( | 70 void StartURLRequest(mojom::URLLoaderFactoryPtrInfo url_loader_factory_info, |
74 std::unique_ptr<service_manager::Connector> connector); | 71 std::unique_ptr<ResourceRequest> request); |
75 | 72 |
76 mojom::URLLoaderFactory* GetURLLoaderFactory(); | 73 mojom::URLLoaderFactory* GetURLLoaderFactory(); |
77 | 74 |
78 NavigationURLLoaderDelegate* delegate_; | 75 NavigationURLLoaderDelegate* delegate_; |
79 | 76 |
| 77 mojom::URLLoaderFactoryPtr url_loader_factory_; |
80 mojo::Binding<mojom::URLLoaderClient> binding_; | 78 mojo::Binding<mojom::URLLoaderClient> binding_; |
81 std::unique_ptr<NavigationRequestInfo> request_info_; | 79 std::unique_ptr<NavigationRequestInfo> request_info_; |
82 mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_; | 80 mojom::URLLoaderAssociatedPtr url_loader_associated_ptr_; |
83 scoped_refptr<ResourceResponse> response_; | 81 scoped_refptr<ResourceResponse> response_; |
84 SSLStatus ssl_status_; | 82 SSLStatus ssl_status_; |
| 83 std::unique_ptr<ResourceRequest> new_request_; |
85 | 84 |
86 base::WeakPtrFactory<NavigationURLLoaderNetworkService> weak_factory_; | 85 base::WeakPtrFactory<NavigationURLLoaderNetworkService> weak_factory_; |
87 | 86 |
88 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService); | 87 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderNetworkService); |
89 }; | 88 }; |
90 | 89 |
91 } // namespace content | 90 } // namespace content |
92 | 91 |
93 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ | 92 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_NETWORK_SERVICE_H_ |
OLD | NEW |