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 "content/browser/frame_host/navigation_request_info.h" | 9 #include "content/browser/frame_host/navigation_request_info.h" |
10 #include "content/browser/loader/navigation_resource_handler.h" | 10 #include "content/browser/loader/navigation_resource_handler.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 31 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
32 | 32 |
33 if (resource_handler_) | 33 if (resource_handler_) |
34 resource_handler_->Cancel(); | 34 resource_handler_->Cancel(); |
35 } | 35 } |
36 | 36 |
37 void NavigationURLLoaderImplCore::Start( | 37 void NavigationURLLoaderImplCore::Start( |
38 ResourceContext* resource_context, | 38 ResourceContext* resource_context, |
39 int64 frame_tree_node_id, | 39 int64 frame_tree_node_id, |
40 const CommonNavigationParams& common_params, | 40 const CommonNavigationParams& common_params, |
41 scoped_ptr<NavigationRequestInfo> request_info, | 41 scoped_ptr<NavigationRequestInfo> request_info) { |
42 ResourceRequestBody* request_body) { | |
43 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 42 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
44 | 43 |
45 ResourceDispatcherHostImpl::Get()->BeginNavigationRequest( | 44 ResourceDispatcherHostImpl::Get()->BeginNavigationRequest( |
46 resource_context, frame_tree_node_id, | 45 resource_context, frame_tree_node_id, |
47 common_params, *request_info, request_body, | 46 common_params, *request_info, this); |
48 this); | |
49 } | 47 } |
50 | 48 |
51 void NavigationURLLoaderImplCore::FollowRedirect() { | 49 void NavigationURLLoaderImplCore::FollowRedirect() { |
52 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 50 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
53 | 51 |
54 if (resource_handler_) | 52 if (resource_handler_) |
55 resource_handler_->FollowRedirect(); | 53 resource_handler_->FollowRedirect(); |
56 } | 54 } |
57 | 55 |
58 | 56 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void NavigationURLLoaderImplCore::NotifyRequestFailed(int net_error) { | 93 void NavigationURLLoaderImplCore::NotifyRequestFailed(int net_error) { |
96 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 94 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
97 | 95 |
98 BrowserThread::PostTask( | 96 BrowserThread::PostTask( |
99 BrowserThread::UI, FROM_HERE, | 97 BrowserThread::UI, FROM_HERE, |
100 base::Bind(&NavigationURLLoaderImpl::NotifyRequestFailed, loader_, | 98 base::Bind(&NavigationURLLoaderImpl::NotifyRequestFailed, loader_, |
101 net_error)); | 99 net_error)); |
102 } | 100 } |
103 | 101 |
104 } // namespace content | 102 } // namespace content |
OLD | NEW |