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 #include "content/browser/loader/async_resource_handler.h" | 5 #include "content/browser/loader/async_resource_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 return true; | 214 return true; |
215 } | 215 } |
216 | 216 |
217 bool AsyncResourceHandler::OnWillStart(int request_id, | 217 bool AsyncResourceHandler::OnWillStart(int request_id, |
218 const GURL& url, | 218 const GURL& url, |
219 bool* defer) { | 219 bool* defer) { |
220 return true; | 220 return true; |
221 } | 221 } |
222 | 222 |
| 223 bool AsyncResourceHandler::OnBeforeNetworkStart(int request_id, |
| 224 const GURL& url, |
| 225 bool* defer) { |
| 226 return true; |
| 227 } |
| 228 |
223 bool AsyncResourceHandler::OnWillRead(int request_id, | 229 bool AsyncResourceHandler::OnWillRead(int request_id, |
224 scoped_refptr<net::IOBuffer>* buf, | 230 scoped_refptr<net::IOBuffer>* buf, |
225 int* buf_size, | 231 int* buf_size, |
226 int min_size) { | 232 int min_size) { |
227 DCHECK_EQ(-1, min_size); | 233 DCHECK_EQ(-1, min_size); |
228 | 234 |
229 if (!EnsureResourceBufferIsInitialized()) | 235 if (!EnsureResourceBufferIsInitialized()) |
230 return false; | 236 return false; |
231 | 237 |
232 DCHECK(buffer_->CanAllocate()); | 238 DCHECK(buffer_->CanAllocate()); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 request()->LogUnblocked(); | 388 request()->LogUnblocked(); |
383 controller()->Resume(); | 389 controller()->Resume(); |
384 } | 390 } |
385 } | 391 } |
386 | 392 |
387 void AsyncResourceHandler::OnDefer() { | 393 void AsyncResourceHandler::OnDefer() { |
388 request()->LogBlockedBy("AsyncResourceHandler"); | 394 request()->LogBlockedBy("AsyncResourceHandler"); |
389 } | 395 } |
390 | 396 |
391 } // namespace content | 397 } // namespace content |
OLD | NEW |