Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: content/child/url_loader_client_impl.cc

Issue 2658583002: Revert of Use associated interface on DownloadedTempFile (Closed)
Patch Set: Rebased. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/url_loader_client_impl.h ('k') | content/common/url_loader.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/child/url_loader_client_impl.h" 5 #include "content/child/url_loader_client_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "content/child/resource_dispatcher.h" 9 #include "content/child/resource_dispatcher.h"
10 #include "content/child/url_response_body_consumer.h" 10 #include "content/child/url_response_body_consumer.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (has_completion_message) { 105 if (has_completion_message) {
106 DCHECK_GT(messages.size(), 0u); 106 DCHECK_GT(messages.size(), 0u);
107 DCHECK_EQ(messages.back().type(), 107 DCHECK_EQ(messages.back().type(),
108 static_cast<uint32_t>(ResourceMsg_RequestComplete::ID)); 108 static_cast<uint32_t>(ResourceMsg_RequestComplete::ID));
109 Dispatch(messages.back()); 109 Dispatch(messages.back());
110 } 110 }
111 } 111 }
112 112
113 void URLLoaderClientImpl::OnReceiveResponse( 113 void URLLoaderClientImpl::OnReceiveResponse(
114 const ResourceResponseHead& response_head, 114 const ResourceResponseHead& response_head,
115 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file) { 115 mojom::DownloadedTempFilePtr downloaded_file) {
116 has_received_response_ = true; 116 has_received_response_ = true;
117 downloaded_file_.Bind(std::move(downloaded_file)); 117 downloaded_file_ = std::move(downloaded_file);
118 Dispatch(ResourceMsg_ReceivedResponse(request_id_, response_head)); 118 Dispatch(ResourceMsg_ReceivedResponse(request_id_, response_head));
119 } 119 }
120 120
121 void URLLoaderClientImpl::OnReceiveRedirect( 121 void URLLoaderClientImpl::OnReceiveRedirect(
122 const net::RedirectInfo& redirect_info, 122 const net::RedirectInfo& redirect_info,
123 const ResourceResponseHead& response_head) { 123 const ResourceResponseHead& response_head) {
124 DCHECK(!has_received_response_); 124 DCHECK(!has_received_response_);
125 DCHECK(!body_consumer_); 125 DCHECK(!body_consumer_);
126 Dispatch( 126 Dispatch(
127 ResourceMsg_ReceivedRedirect(request_id_, redirect_info, response_head)); 127 ResourceMsg_ReceivedRedirect(request_id_, redirect_info, response_head));
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 void URLLoaderClientImpl::OnUploadProgress(int64_t current_position, 181 void URLLoaderClientImpl::OnUploadProgress(int64_t current_position,
182 int64_t total_size, 182 int64_t total_size,
183 const base::Closure& ack_callback) { 183 const base::Closure& ack_callback) {
184 Dispatch( 184 Dispatch(
185 ResourceMsg_UploadProgress(request_id_, current_position, total_size)); 185 ResourceMsg_UploadProgress(request_id_, current_position, total_size));
186 ack_callback.Run(); 186 ack_callback.Run();
187 } 187 }
188 188
189 } // namespace content 189 } // namespace content
OLDNEW
« no previous file with comments | « content/child/url_loader_client_impl.h ('k') | content/common/url_loader.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698