Index: content/browser/loader/navigation_url_loader_network_service.cc |
diff --git a/content/browser/loader/navigation_url_loader_network_service.cc b/content/browser/loader/navigation_url_loader_network_service.cc |
index b29827b44656b862170e1c7bc7cfd320bc1b3c4a..ad082ef388019400e8b2c6eee4ce724322db170e 100644 |
--- a/content/browser/loader/navigation_url_loader_network_service.cc |
+++ b/content/browser/loader/navigation_url_loader_network_service.cc |
@@ -8,7 +8,11 @@ |
#include "content/browser/frame_host/navigation_request_info.h" |
#include "content/browser/loader/navigation_url_loader_delegate.h" |
#include "content/public/browser/browser_thread.h" |
+#include "content/public/browser/global_request_id.h" |
+#include "content/public/browser/navigation_data.h" |
#include "content/public/browser/navigation_ui_data.h" |
+#include "content/public/browser/ssl_status.h" |
+#include "content/public/browser/stream_handle.h" |
#include "content/public/common/service_manager_connection.h" |
#include "content/public/common/service_names.mojom.h" |
#include "net/url_request/url_request_context.h" |
@@ -62,8 +66,11 @@ void NavigationURLLoaderNetworkService::ProceedWithResponse() {} |
void NavigationURLLoaderNetworkService::OnReceiveResponse( |
const ResourceResponseHead& head, |
mojom::DownloadedTempFilePtr downloaded_file) { |
- // TODO(scottmg): This should mirror code in |
- // NavigationResourceHandler::OnReponseStarted(). |
+ // TODO(scottmg): This needs to do more of what |
+ // NavigationResourceHandler::OnReponseStarted() does. Or maybe in |
+ // OnStartLoadingResponseBody(). |
+ response_ = new ResourceResponse(); |
dcheng
2017/04/12 21:18:16
Nit: base::MakeShared<ResourceResponse>();
scottmg
2017/04/12 21:28:50
Doh, more of them! Done.
(For my edification... I
dcheng
2017/04/12 21:31:11
in my opinion, it's nice not to have a bare new, s
scottmg
2017/04/12 21:35:28
so ideally someday, the only bare 'new's would rep
|
+ response_->head = head; |
} |
void NavigationURLLoaderNetworkService::OnReceiveRedirect( |
@@ -91,7 +98,16 @@ void NavigationURLLoaderNetworkService::OnTransferSizeUpdated( |
int32_t transfer_size_diff) {} |
void NavigationURLLoaderNetworkService::OnStartLoadingResponseBody( |
- mojo::ScopedDataPipeConsumerHandle body) {} |
+ mojo::ScopedDataPipeConsumerHandle body) { |
+ DCHECK(response_); |
+ // Temporarily, we pass both a stream (null) and the data pipe to the |
+ // delegate until PlzNavigate has shipped and we can be comfortable fully |
+ // switching to the data pipe. |
+ delegate_->OnResponseStarted( |
+ response_, std::unique_ptr<StreamHandle>(), std::move(body), SSLStatus(), |
dcheng
2017/04/12 21:18:16
Nit: nullptr
scottmg
2017/04/12 21:28:50
Done.
|
+ std::unique_ptr<NavigationData>(), GlobalRequestID() /* request_id? */, |
+ false /* is_download? */, false /* is_stream */); |
+} |
void NavigationURLLoaderNetworkService::OnComplete( |
const ResourceRequestCompletionStatus& completion_status) {} |