| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/intercepting_resource_handler.h" | 5 #include "content/browser/loader/intercepting_resource_handler.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "content/public/common/resource_response.h" | 9 #include "content/public/common/resource_response.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| 11 #include "net/url_request/url_request.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 InterceptingResourceHandler::InterceptingResourceHandler( | 15 InterceptingResourceHandler::InterceptingResourceHandler( |
| 15 std::unique_ptr<ResourceHandler> next_handler, | 16 std::unique_ptr<ResourceHandler> next_handler, |
| 16 net::URLRequest* request) | 17 net::URLRequest* request) |
| 17 : LayeredResourceHandler(request, std::move(next_handler)), | 18 : LayeredResourceHandler(request, std::move(next_handler)), |
| 18 state_(State::STARTING), | 19 state_(State::STARTING), |
| 19 first_read_buffer_size_(0) {} | 20 first_read_buffer_size_(0) {} |
| 20 | 21 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 payload_for_old_handler_ = std::string(); | 155 payload_for_old_handler_ = std::string(); |
| 155 DCHECK(!defer_ignored); | 156 DCHECK(!defer_ignored); |
| 156 | 157 |
| 157 // Finalize the request. | 158 // Finalize the request. |
| 158 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0); | 159 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0); |
| 159 next_handler_->OnResponseCompleted(status, &defer_ignored); | 160 next_handler_->OnResponseCompleted(status, &defer_ignored); |
| 160 DCHECK(!defer_ignored); | 161 DCHECK(!defer_ignored); |
| 161 } | 162 } |
| 162 | 163 |
| 163 } // namespace content | 164 } // namespace content |
| OLD | NEW |