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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "content/browser/frame_host/navigation_request_info.h" | 9 #include "content/browser/frame_host/navigation_request_info.h" |
10 #include "content/browser/loader/navigation_url_loader_delegate.h" | 10 #include "content/browser/loader/navigation_url_loader_delegate.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 43 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
44 | 44 |
45 BrowserThread::PostTask( | 45 BrowserThread::PostTask( |
46 BrowserThread::IO, FROM_HERE, | 46 BrowserThread::IO, FROM_HERE, |
47 base::Bind(&NavigationURLLoaderImplCore::FollowRedirect, | 47 base::Bind(&NavigationURLLoaderImplCore::FollowRedirect, |
48 base::Unretained(core_))); | 48 base::Unretained(core_))); |
49 } | 49 } |
50 | 50 |
51 void NavigationURLLoaderImpl::NotifyRequestRedirected( | 51 void NavigationURLLoaderImpl::NotifyRequestRedirected( |
52 const net::RedirectInfo& redirect_info, | 52 const net::RedirectInfo& redirect_info, |
53 const scoped_refptr<ResourceResponse>& response) { | 53 const scoped_refptr<ResourceResponse>& response, |
| 54 bool is_external_protocol) { |
54 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 55 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
55 | 56 |
56 delegate_->OnRequestRedirected(redirect_info, response); | 57 delegate_->OnRequestRedirected(redirect_info, response, is_external_protocol); |
57 } | 58 } |
58 | 59 |
59 void NavigationURLLoaderImpl::NotifyResponseStarted( | 60 void NavigationURLLoaderImpl::NotifyResponseStarted( |
60 const scoped_refptr<ResourceResponse>& response, | 61 const scoped_refptr<ResourceResponse>& response, |
61 scoped_ptr<StreamHandle> body) { | 62 scoped_ptr<StreamHandle> body) { |
62 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 63 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
63 | 64 |
64 delegate_->OnResponseStarted(response, body.Pass()); | 65 delegate_->OnResponseStarted(response, body.Pass()); |
65 } | 66 } |
66 | 67 |
67 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache, | 68 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache, |
68 int net_error) { | 69 int net_error) { |
69 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 70 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
70 | 71 |
71 delegate_->OnRequestFailed(in_cache, net_error); | 72 delegate_->OnRequestFailed(in_cache, net_error); |
72 } | 73 } |
73 | 74 |
74 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { | 75 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { |
75 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 76 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
76 | 77 |
77 delegate_->OnRequestStarted(timestamp); | 78 delegate_->OnRequestStarted(timestamp); |
78 } | 79 } |
79 | 80 |
80 } // namespace content | 81 } // namespace content |
OLD | NEW |