OLD | NEW |
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 Loading... |
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. |
216 void ResourceDispatcher::OnReceivedData(int request_id, | 218 void ResourceDispatcher::OnReceivedData(int request_id, |
| 219 int /* dummy variable */, |
217 int data_offset, | 220 int data_offset, |
218 int data_length, | 221 int data_length, |
219 int encoded_data_length) { | 222 int encoded_data_length) { |
220 TRACE_EVENT0("loader", "ResourceDispatcher::OnReceivedData"); | 223 TRACE_EVENT0("loader", "ResourceDispatcher::OnReceivedData"); |
221 DCHECK_GT(data_length, 0); | 224 DCHECK_GT(data_length, 0); |
222 PendingRequestInfo* request_info = GetPendingRequestInfo(request_id); | 225 PendingRequestInfo* request_info = GetPendingRequestInfo(request_id); |
223 bool send_ack = true; | 226 bool send_ack = true; |
224 if (request_info && data_length > 0) { | 227 if (request_info && data_length > 0) { |
225 // TODO(erikchen): Temporary code to help track http://crbug.com/527588. | 228 // TODO(erikchen): Temporary code to help track http://crbug.com/527588. |
226 int buffer_size = request_info->buffer_size; | 229 int buffer_size = request_info->buffer_size; |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 extra_data->transferred_request_request_id(); | 801 extra_data->transferred_request_request_id(); |
799 request->service_worker_provider_id = | 802 request->service_worker_provider_id = |
800 extra_data->service_worker_provider_id(); | 803 extra_data->service_worker_provider_id(); |
801 request->request_body = request_body; | 804 request->request_body = request_body; |
802 if (frame_origin) | 805 if (frame_origin) |
803 *frame_origin = extra_data->frame_origin(); | 806 *frame_origin = extra_data->frame_origin(); |
804 return request.Pass(); | 807 return request.Pass(); |
805 } | 808 } |
806 | 809 |
807 } // namespace content | 810 } // namespace content |
OLD | NEW |