| 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_core.h" | 5 #include "content/browser/loader/navigation_url_loader_impl_core.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 "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/frame_host/navigation_request_info.h" | 10 #include "content/browser/frame_host/navigation_request_info.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // | 88 // |
| 89 // TODO(davidben): This copy could be avoided if ResourceResponse weren't | 89 // TODO(davidben): This copy could be avoided if ResourceResponse weren't |
| 90 // reference counted and the loader stack passed unique ownership of the | 90 // reference counted and the loader stack passed unique ownership of the |
| 91 // response. https://crbug.com/416050 | 91 // response. https://crbug.com/416050 |
| 92 BrowserThread::PostTask( | 92 BrowserThread::PostTask( |
| 93 BrowserThread::UI, FROM_HERE, | 93 BrowserThread::UI, FROM_HERE, |
| 94 base::Bind(&NavigationURLLoaderImpl::NotifyResponseStarted, loader_, | 94 base::Bind(&NavigationURLLoaderImpl::NotifyResponseStarted, loader_, |
| 95 response->DeepCopy(), base::Passed(&body))); | 95 response->DeepCopy(), base::Passed(&body))); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void NavigationURLLoaderImplCore::NotifyRequestFailed(int net_error) { | 98 void NavigationURLLoaderImplCore::NotifyRequestFailed(bool in_cache, |
| 99 int net_error) { |
| 99 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 100 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 100 | 101 |
| 101 BrowserThread::PostTask( | 102 BrowserThread::PostTask( |
| 102 BrowserThread::UI, FROM_HERE, | 103 BrowserThread::UI, FROM_HERE, |
| 103 base::Bind(&NavigationURLLoaderImpl::NotifyRequestFailed, loader_, | 104 base::Bind(&NavigationURLLoaderImpl::NotifyRequestFailed, loader_, |
| 104 net_error)); | 105 in_cache, net_error)); |
| 105 } | 106 } |
| 106 | 107 |
| 107 } // namespace content | 108 } // namespace content |
| OLD | NEW |