| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/navigation_url_loader_impl.h" | 5 #include "content/browser/loader/navigation_url_loader_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 void NavigationURLLoaderImpl::NotifyRequestRedirected( | 65 void NavigationURLLoaderImpl::NotifyRequestRedirected( |
| 66 const net::RedirectInfo& redirect_info, | 66 const net::RedirectInfo& redirect_info, |
| 67 const scoped_refptr<ResourceResponse>& response) { | 67 const scoped_refptr<ResourceResponse>& response) { |
| 68 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 68 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 69 | 69 |
| 70 delegate_->OnRequestRedirected(redirect_info, response); | 70 delegate_->OnRequestRedirected(redirect_info, response); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void NavigationURLLoaderImpl::NotifyResponseStarted( | 73 void NavigationURLLoaderImpl::NotifyResponseStarted( |
| 74 const scoped_refptr<ResourceResponse>& response, | 74 const scoped_refptr<ResourceResponse>& response, |
| 75 scoped_ptr<StreamHandle> body) { | 75 mojo::ScopedDataPipeConsumerHandle data_consumer_handle, |
| 76 int request_id) { |
| 76 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 77 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 77 | 78 |
| 78 delegate_->OnResponseStarted(response, std::move(body)); | 79 delegate_->OnResponseStarted(response, std::move(data_consumer_handle), |
| 80 request_id); |
| 79 } | 81 } |
| 80 | 82 |
| 81 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache, | 83 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache, |
| 82 int net_error) { | 84 int net_error) { |
| 83 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 85 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 84 | 86 |
| 85 delegate_->OnRequestFailed(in_cache, net_error); | 87 delegate_->OnRequestFailed(in_cache, net_error); |
| 86 } | 88 } |
| 87 | 89 |
| 88 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { | 90 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { |
| 89 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 91 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 90 | 92 |
| 91 delegate_->OnRequestStarted(timestamp); | 93 delegate_->OnRequestStarted(timestamp); |
| 92 } | 94 } |
| 93 | 95 |
| 94 } // namespace content | 96 } // namespace content |
| OLD | NEW |