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 13 matching lines...) Expand all Loading... |
24 #include "content/browser/resource_context_impl.h" | 24 #include "content/browser/resource_context_impl.h" |
25 #include "content/common/resource_messages.h" | 25 #include "content/common/resource_messages.h" |
26 #include "content/common/view_messages.h" | 26 #include "content/common/view_messages.h" |
27 #include "content/public/browser/global_request_id.h" | 27 #include "content/public/browser/global_request_id.h" |
28 #include "content/public/browser/resource_dispatcher_host_delegate.h" | 28 #include "content/public/browser/resource_dispatcher_host_delegate.h" |
29 #include "content/public/common/resource_response.h" | 29 #include "content/public/common/resource_response.h" |
30 #include "net/base/io_buffer.h" | 30 #include "net/base/io_buffer.h" |
31 #include "net/base/load_flags.h" | 31 #include "net/base/load_flags.h" |
32 #include "net/base/net_log.h" | 32 #include "net/base/net_log.h" |
33 #include "net/base/net_util.h" | 33 #include "net/base/net_util.h" |
34 #include "webkit/glue/resource_loader_bridge.h" | |
35 | 34 |
36 using base::TimeTicks; | 35 using base::TimeTicks; |
37 | 36 |
38 namespace content { | 37 namespace content { |
39 namespace { | 38 namespace { |
40 | 39 |
41 static int kBufferSize = 1024 * 512; | 40 static int kBufferSize = 1024 * 512; |
42 static int kMinAllocationSize = 1024 * 4; | 41 static int kMinAllocationSize = 1024 * 4; |
43 static int kMaxAllocationSize = 1024 * 32; | 42 static int kMaxAllocationSize = 1024 * 32; |
44 | 43 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 } | 357 } |
359 | 358 |
360 void AsyncResourceHandler::ResumeIfDeferred() { | 359 void AsyncResourceHandler::ResumeIfDeferred() { |
361 if (did_defer_) { | 360 if (did_defer_) { |
362 did_defer_ = false; | 361 did_defer_ = false; |
363 controller()->Resume(); | 362 controller()->Resume(); |
364 } | 363 } |
365 } | 364 } |
366 | 365 |
367 } // namespace content | 366 } // namespace content |
OLD | NEW |