| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 void NavigationURLLoaderImpl::FollowRedirect() { | 56 void NavigationURLLoaderImpl::FollowRedirect() { |
| 57 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 57 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 58 | 58 |
| 59 BrowserThread::PostTask( | 59 BrowserThread::PostTask( |
| 60 BrowserThread::IO, FROM_HERE, | 60 BrowserThread::IO, FROM_HERE, |
| 61 base::Bind(&NavigationURLLoaderImplCore::FollowRedirect, | 61 base::Bind(&NavigationURLLoaderImplCore::FollowRedirect, |
| 62 base::Unretained(core_))); | 62 base::Unretained(core_))); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void NavigationURLLoaderImpl::ProceedWithResponse() { |
| 66 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 67 |
| 68 BrowserThread::PostTask( |
| 69 BrowserThread::IO, FROM_HERE, |
| 70 base::Bind(&NavigationURLLoaderImplCore::ProceedWithResponse, |
| 71 base::Unretained(core_))); |
| 72 } |
| 73 |
| 65 void NavigationURLLoaderImpl::NotifyRequestRedirected( | 74 void NavigationURLLoaderImpl::NotifyRequestRedirected( |
| 66 const net::RedirectInfo& redirect_info, | 75 const net::RedirectInfo& redirect_info, |
| 67 const scoped_refptr<ResourceResponse>& response) { | 76 const scoped_refptr<ResourceResponse>& response) { |
| 68 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 77 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 69 | 78 |
| 70 delegate_->OnRequestRedirected(redirect_info, response); | 79 delegate_->OnRequestRedirected(redirect_info, response); |
| 71 } | 80 } |
| 72 | 81 |
| 73 void NavigationURLLoaderImpl::NotifyResponseStarted( | 82 void NavigationURLLoaderImpl::NotifyResponseStarted( |
| 74 const scoped_refptr<ResourceResponse>& response, | 83 const scoped_refptr<ResourceResponse>& response, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 85 delegate_->OnRequestFailed(in_cache, net_error); | 94 delegate_->OnRequestFailed(in_cache, net_error); |
| 86 } | 95 } |
| 87 | 96 |
| 88 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { | 97 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { |
| 89 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 98 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 90 | 99 |
| 91 delegate_->OnRequestStarted(timestamp); | 100 delegate_->OnRequestStarted(timestamp); |
| 92 } | 101 } |
| 93 | 102 |
| 94 } // namespace content | 103 } // namespace content |
| OLD | NEW |