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" |
11 #include "content/browser/loader/navigation_url_loader_impl_core.h" | 11 #include "content/browser/loader/navigation_url_loader_impl_core.h" |
12 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "content/public/browser/stream_handle.h" | 14 #include "content/public/browser/stream_handle.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 NavigationURLLoaderImpl::NavigationURLLoaderImpl( | 18 NavigationURLLoaderImpl::NavigationURLLoaderImpl( |
19 BrowserContext* browser_context, | 19 BrowserContext* browser_context, |
20 int64 frame_tree_node_id, | 20 int frame_tree_node_id, |
21 scoped_ptr<NavigationRequestInfo> request_info, | 21 scoped_ptr<NavigationRequestInfo> request_info, |
22 NavigationURLLoaderDelegate* delegate) | 22 NavigationURLLoaderDelegate* delegate) |
23 : delegate_(delegate), | 23 : delegate_(delegate), |
24 weak_factory_(this) { | 24 weak_factory_(this) { |
25 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 25 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
26 | 26 |
27 core_ = new NavigationURLLoaderImplCore(weak_factory_.GetWeakPtr()); | 27 core_ = new NavigationURLLoaderImplCore(weak_factory_.GetWeakPtr()); |
28 BrowserThread::PostTask( | 28 BrowserThread::PostTask( |
29 BrowserThread::IO, FROM_HERE, | 29 BrowserThread::IO, FROM_HERE, |
30 base::Bind(&NavigationURLLoaderImplCore::Start, base::Unretained(core_), | 30 base::Bind(&NavigationURLLoaderImplCore::Start, base::Unretained(core_), |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 delegate_->OnRequestFailed(in_cache, net_error); | 71 delegate_->OnRequestFailed(in_cache, net_error); |
72 } | 72 } |
73 | 73 |
74 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { | 74 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { |
75 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 75 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
76 | 76 |
77 delegate_->OnRequestStarted(timestamp); | 77 delegate_->OnRequestStarted(timestamp); |
78 } | 78 } |
79 | 79 |
80 } // namespace content | 80 } // namespace content |
OLD | NEW |