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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 } // namespace | 68 } // namespace |
69 | 69 |
70 class DependentIOBuffer : public net::WrappedIOBuffer { | 70 class DependentIOBuffer : public net::WrappedIOBuffer { |
71 public: | 71 public: |
72 DependentIOBuffer(ResourceBuffer* backing, char* memory) | 72 DependentIOBuffer(ResourceBuffer* backing, char* memory) |
73 : net::WrappedIOBuffer(memory), | 73 : net::WrappedIOBuffer(memory), |
74 backing_(backing) { | 74 backing_(backing) { |
75 } | 75 } |
76 private: | 76 private: |
77 ~DependentIOBuffer() {} | 77 virtual ~DependentIOBuffer() {} |
78 scoped_refptr<ResourceBuffer> backing_; | 78 scoped_refptr<ResourceBuffer> backing_; |
79 }; | 79 }; |
80 | 80 |
81 AsyncResourceHandler::AsyncResourceHandler( | 81 AsyncResourceHandler::AsyncResourceHandler( |
82 ResourceMessageFilter* filter, | 82 ResourceMessageFilter* filter, |
83 int routing_id, | 83 int routing_id, |
84 net::URLRequest* request, | 84 net::URLRequest* request, |
85 ResourceDispatcherHostImpl* rdh) | 85 ResourceDispatcherHostImpl* rdh) |
86 : filter_(filter), | 86 : filter_(filter), |
87 routing_id_(routing_id), | 87 routing_id_(routing_id), |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 } | 338 } |
339 | 339 |
340 void AsyncResourceHandler::ResumeIfDeferred() { | 340 void AsyncResourceHandler::ResumeIfDeferred() { |
341 if (did_defer_) { | 341 if (did_defer_) { |
342 did_defer_ = false; | 342 did_defer_ = false; |
343 controller()->Resume(); | 343 controller()->Resume(); |
344 } | 344 } |
345 } | 345 } |
346 | 346 |
347 } // namespace content | 347 } // namespace content |
OLD | NEW |