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> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/location.h" | 10 #include "base/location.h" |
9 #include "content/browser/frame_host/navigation_request_info.h" | 11 #include "content/browser/frame_host/navigation_request_info.h" |
10 #include "content/browser/loader/navigation_url_loader_delegate.h" | 12 #include "content/browser/loader/navigation_url_loader_delegate.h" |
11 #include "content/browser/loader/navigation_url_loader_impl_core.h" | 13 #include "content/browser/loader/navigation_url_loader_impl_core.h" |
12 #include "content/browser/service_worker/service_worker_navigation_handle.h" | 14 #include "content/browser/service_worker/service_worker_navigation_handle.h" |
13 #include "content/public/browser/browser_context.h" | 15 #include "content/public/browser/browser_context.h" |
14 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/browser/stream_handle.h" | 17 #include "content/public/browser/stream_handle.h" |
16 | 18 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 58 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
57 | 59 |
58 delegate_->OnRequestRedirected(redirect_info, response); | 60 delegate_->OnRequestRedirected(redirect_info, response); |
59 } | 61 } |
60 | 62 |
61 void NavigationURLLoaderImpl::NotifyResponseStarted( | 63 void NavigationURLLoaderImpl::NotifyResponseStarted( |
62 const scoped_refptr<ResourceResponse>& response, | 64 const scoped_refptr<ResourceResponse>& response, |
63 scoped_ptr<StreamHandle> body) { | 65 scoped_ptr<StreamHandle> body) { |
64 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 66 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
65 | 67 |
66 delegate_->OnResponseStarted(response, body.Pass()); | 68 delegate_->OnResponseStarted(response, std::move(body)); |
67 } | 69 } |
68 | 70 |
69 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache, | 71 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache, |
70 int net_error) { | 72 int net_error) { |
71 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 73 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
72 | 74 |
73 delegate_->OnRequestFailed(in_cache, net_error); | 75 delegate_->OnRequestFailed(in_cache, net_error); |
74 } | 76 } |
75 | 77 |
76 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { | 78 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { |
77 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 79 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
78 | 80 |
79 delegate_->OnRequestStarted(timestamp); | 81 delegate_->OnRequestStarted(timestamp); |
80 } | 82 } |
81 | 83 |
82 } // namespace content | 84 } // namespace content |
OLD | NEW |