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

Side by Side Diff: content/browser/loader/mojo_async_resource_handler.cc

Issue 2695333002: Mojo C++ bindings: remove usage of AssociatedGroup from content/ (Closed)
Patch Set: . Created 3 years, 10 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
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/browser/loader/mojo_async_resource_handler.h" 5 #include "content/browser/loader/mojo_async_resource_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 NetLogObserver::PopulateResponseInfo(request(), response); 188 NetLogObserver::PopulateResponseInfo(request(), response);
189 response->head.encoded_data_length = request()->raw_header_size(); 189 response->head.encoded_data_length = request()->raw_header_size();
190 reported_total_received_bytes_ = response->head.encoded_data_length; 190 reported_total_received_bytes_ = response->head.encoded_data_length;
191 191
192 response->head.request_start = request()->creation_time(); 192 response->head.request_start = request()->creation_time();
193 response->head.response_start = base::TimeTicks::Now(); 193 response->head.response_start = base::TimeTicks::Now();
194 sent_received_response_message_ = true; 194 sent_received_response_message_ = true;
195 195
196 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file_ptr; 196 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file_ptr;
197 if (!response->head.download_file_path.empty()) { 197 if (!response->head.download_file_path.empty()) {
198 downloaded_file_ptr = DownloadedTempFileImpl::Create( 198 downloaded_file_ptr = DownloadedTempFileImpl::Create(info->GetChildID(),
199 binding_.associated_group(), info->GetChildID(), info->GetRequestID()); 199 info->GetRequestID());
200 rdh_->RegisterDownloadedTempFile(info->GetChildID(), info->GetRequestID(), 200 rdh_->RegisterDownloadedTempFile(info->GetChildID(), info->GetRequestID(),
201 response->head.download_file_path); 201 response->head.download_file_path);
202 } 202 }
203 203
204 url_loader_client_->OnReceiveResponse(response->head, 204 url_loader_client_->OnReceiveResponse(response->head,
205 std::move(downloaded_file_ptr)); 205 std::move(downloaded_file_ptr));
206 206
207 net::IOBufferWithSize* metadata = GetResponseMetadata(request()); 207 net::IOBufferWithSize* metadata = GetResponseMetadata(request());
208 if (metadata) { 208 if (metadata) {
209 const uint8_t* data = reinterpret_cast<const uint8_t*>(metadata->data()); 209 const uint8_t* data = reinterpret_cast<const uint8_t*>(metadata->data());
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 base::Bind(&MojoAsyncResourceHandler::OnUploadProgressACK, 576 base::Bind(&MojoAsyncResourceHandler::OnUploadProgressACK,
577 weak_factory_.GetWeakPtr())); 577 weak_factory_.GetWeakPtr()));
578 } 578 }
579 579
580 void MojoAsyncResourceHandler::OnUploadProgressACK() { 580 void MojoAsyncResourceHandler::OnUploadProgressACK() {
581 if (upload_progress_tracker_) 581 if (upload_progress_tracker_)
582 upload_progress_tracker_->OnAckReceived(); 582 upload_progress_tracker_->OnAckReceived();
583 } 583 }
584 584
585 } // namespace content 585 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/downloaded_temp_file_impl.cc ('k') | content/browser/loader/mojo_async_resource_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698