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

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

Issue 1347373003: Revert of Add a dummy variable to ResourceMsg_DataReceived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_revert2
Patch Set: Created 5 years, 3 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/resource_dispatcher.h ('k') | content/child/resource_dispatcher_unittest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/child/resource_dispatcher.h" 7 #include "content/child/resource_dispatcher.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 base::SharedMemoryHandle shm_handle_copy = shm_handle; 206 base::SharedMemoryHandle shm_handle_copy = shm_handle;
207 base::debug::Alias(&shm_handle_copy); 207 base::debug::Alias(&shm_handle_copy);
208 208
209 CrashOnMapFailure(); 209 CrashOnMapFailure();
210 return; 210 return;
211 } 211 }
212 212
213 request_info->buffer_size = shm_size; 213 request_info->buffer_size = shm_size;
214 } 214 }
215 215
216 // TODO(erikchen): This dummy variable is temporary and is only intended to be
217 // present for one Canary release. http://crbug.com/527588.
218 void ResourceDispatcher::OnReceivedData(int request_id, 216 void ResourceDispatcher::OnReceivedData(int request_id,
219 int /* dummy variable */,
220 int data_offset, 217 int data_offset,
221 int data_length, 218 int data_length,
222 int encoded_data_length) { 219 int encoded_data_length) {
223 TRACE_EVENT0("loader", "ResourceDispatcher::OnReceivedData"); 220 TRACE_EVENT0("loader", "ResourceDispatcher::OnReceivedData");
224 DCHECK_GT(data_length, 0); 221 DCHECK_GT(data_length, 0);
225 PendingRequestInfo* request_info = GetPendingRequestInfo(request_id); 222 PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
226 bool send_ack = true; 223 bool send_ack = true;
227 if (request_info && data_length > 0) { 224 if (request_info && data_length > 0) {
228 // TODO(erikchen): Temporary code to help track http://crbug.com/527588. 225 // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
229 int buffer_size = request_info->buffer_size; 226 int buffer_size = request_info->buffer_size;
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 extra_data->transferred_request_request_id(); 798 extra_data->transferred_request_request_id();
802 request->service_worker_provider_id = 799 request->service_worker_provider_id =
803 extra_data->service_worker_provider_id(); 800 extra_data->service_worker_provider_id();
804 request->request_body = request_body; 801 request->request_body = request_body;
805 if (frame_origin) 802 if (frame_origin)
806 *frame_origin = extra_data->frame_origin(); 803 *frame_origin = extra_data->frame_origin();
807 return request.Pass(); 804 return request.Pass();
808 } 805 }
809 806
810 } // namespace content 807 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698