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/throttling_resource_handler.h" | 5 #include "content/browser/loader/throttling_resource_handler.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
| 9 #include "content/browser/loader/resource_controller.h" |
9 #include "content/browser/loader/resource_request_info_impl.h" | 10 #include "content/browser/loader/resource_request_info_impl.h" |
10 #include "content/public/browser/resource_controller.h" | |
11 #include "content/public/common/resource_response.h" | 11 #include "content/public/common/resource_response.h" |
12 #include "net/url_request/url_request.h" | 12 #include "net/url_request/url_request.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 ThrottlingResourceHandler::ThrottlingResourceHandler( | 16 ThrottlingResourceHandler::ThrottlingResourceHandler( |
17 std::unique_ptr<ResourceHandler> next_handler, | 17 std::unique_ptr<ResourceHandler> next_handler, |
18 net::URLRequest* request, | 18 net::URLRequest* request, |
19 ScopedVector<ResourceThrottle> throttles) | 19 ScopedVector<ResourceThrottle> throttles) |
20 : LayeredResourceHandler(request, std::move(next_handler)), | 20 : LayeredResourceHandler(request, std::move(next_handler)), |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 } else if (!defer) { | 187 } else if (!defer) { |
188 controller()->Resume(); | 188 controller()->Resume(); |
189 } | 189 } |
190 } | 190 } |
191 | 191 |
192 void ThrottlingResourceHandler::OnRequestDeferred(int throttle_index) { | 192 void ThrottlingResourceHandler::OnRequestDeferred(int throttle_index) { |
193 request()->LogBlockedBy(throttles_[throttle_index]->GetNameForLogging()); | 193 request()->LogBlockedBy(throttles_[throttle_index]->GetNameForLogging()); |
194 } | 194 } |
195 | 195 |
196 } // namespace content | 196 } // namespace content |
OLD | NEW |