| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 9 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| 10 | 10 |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 if (info->has_started_reading) | 921 if (info->has_started_reading) |
| 922 OnReadCompleted(i->second, info->paused_read_bytes); | 922 OnReadCompleted(i->second, info->paused_read_bytes); |
| 923 else | 923 else |
| 924 OnResponseStarted(i->second); | 924 OnResponseStarted(i->second); |
| 925 } | 925 } |
| 926 | 926 |
| 927 bool ResourceDispatcherHost::Read(URLRequest* request, int* bytes_read) { | 927 bool ResourceDispatcherHost::Read(URLRequest* request, int* bytes_read) { |
| 928 ExtraRequestInfo* info = ExtraInfoForRequest(request); | 928 ExtraRequestInfo* info = ExtraInfoForRequest(request); |
| 929 DCHECK(!info->is_paused); | 929 DCHECK(!info->is_paused); |
| 930 | 930 |
| 931 char* buf; | 931 net::IOBuffer* buf; |
| 932 int buf_size; | 932 int buf_size; |
| 933 if (!info->resource_handler->OnWillRead(info->request_id, | 933 if (!info->resource_handler->OnWillRead(info->request_id, |
| 934 &buf, &buf_size, -1)) { | 934 &buf, &buf_size, -1)) { |
| 935 return false; | 935 return false; |
| 936 } | 936 } |
| 937 | 937 |
| 938 DCHECK(buf); | 938 DCHECK(buf); |
| 939 DCHECK(buf_size > 0); | 939 DCHECK(buf_size > 0); |
| 940 | 940 |
| 941 info->has_started_reading = true; | 941 info->has_started_reading = true; |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 for (BlockedRequestsList::iterator req_iter = requests->begin(); | 1311 for (BlockedRequestsList::iterator req_iter = requests->begin(); |
| 1312 req_iter != requests->end(); ++req_iter) { | 1312 req_iter != requests->end(); ++req_iter) { |
| 1313 if (cancel_requests) | 1313 if (cancel_requests) |
| 1314 delete req_iter->url_request; | 1314 delete req_iter->url_request; |
| 1315 else | 1315 else |
| 1316 BeginRequestInternal(req_iter->url_request, req_iter->mixed_content); | 1316 BeginRequestInternal(req_iter->url_request, req_iter->mixed_content); |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 delete requests; | 1319 delete requests; |
| 1320 } | 1320 } |
| OLD | NEW |