| 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/layered_resource_handler.h" | 5 #include "content/browser/loader/layered_resource_handler.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/browser/loader/resource_controller.h" | 10 #include "content/browser/loader/resource_controller.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 void LayeredResourceHandler::OnWillStart( | 43 void LayeredResourceHandler::OnWillStart( |
| 44 const GURL& url, | 44 const GURL& url, |
| 45 std::unique_ptr<ResourceController> controller) { | 45 std::unique_ptr<ResourceController> controller) { |
| 46 DCHECK(next_handler_.get()); | 46 DCHECK(next_handler_.get()); |
| 47 next_handler_->OnWillStart(url, std::move(controller)); | 47 next_handler_->OnWillStart(url, std::move(controller)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool LayeredResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 50 bool LayeredResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 51 int* buf_size, | 51 int* buf_size) { |
| 52 int min_size) { | |
| 53 DCHECK(next_handler_.get()); | 52 DCHECK(next_handler_.get()); |
| 54 return next_handler_->OnWillRead(buf, buf_size, min_size); | 53 return next_handler_->OnWillRead(buf, buf_size); |
| 55 } | 54 } |
| 56 | 55 |
| 57 void LayeredResourceHandler::OnReadCompleted( | 56 void LayeredResourceHandler::OnReadCompleted( |
| 58 int bytes_read, | 57 int bytes_read, |
| 59 std::unique_ptr<ResourceController> controller) { | 58 std::unique_ptr<ResourceController> controller) { |
| 60 DCHECK(next_handler_.get()); | 59 DCHECK(next_handler_.get()); |
| 61 next_handler_->OnReadCompleted(bytes_read, std::move(controller)); | 60 next_handler_->OnReadCompleted(bytes_read, std::move(controller)); |
| 62 } | 61 } |
| 63 | 62 |
| 64 void LayeredResourceHandler::OnResponseCompleted( | 63 void LayeredResourceHandler::OnResponseCompleted( |
| 65 const net::URLRequestStatus& status, | 64 const net::URLRequestStatus& status, |
| 66 std::unique_ptr<ResourceController> controller) { | 65 std::unique_ptr<ResourceController> controller) { |
| 67 DCHECK(next_handler_.get()); | 66 DCHECK(next_handler_.get()); |
| 68 next_handler_->OnResponseCompleted(status, std::move(controller)); | 67 next_handler_->OnResponseCompleted(status, std::move(controller)); |
| 69 } | 68 } |
| 70 | 69 |
| 71 void LayeredResourceHandler::OnDataDownloaded(int bytes_downloaded) { | 70 void LayeredResourceHandler::OnDataDownloaded(int bytes_downloaded) { |
| 72 DCHECK(next_handler_.get()); | 71 DCHECK(next_handler_.get()); |
| 73 next_handler_->OnDataDownloaded(bytes_downloaded); | 72 next_handler_->OnDataDownloaded(bytes_downloaded); |
| 74 } | 73 } |
| 75 | 74 |
| 76 } // namespace content | 75 } // namespace content |
| OLD | NEW |