Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: content/browser/loader/navigation_url_loader_impl_core.cc

Issue 874353003: New TimeToFirstURLJob* navigation metrics now work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final method name change. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/browser/frame_host/navigation_request_info.h" 10 #include "content/browser/frame_host/navigation_request_info.h"
10 #include "content/browser/loader/navigation_resource_handler.h" 11 #include "content/browser/loader/navigation_resource_handler.h"
11 #include "content/browser/loader/resource_dispatcher_host_impl.h" 12 #include "content/browser/loader/resource_dispatcher_host_impl.h"
12 #include "content/common/navigation_params.h" 13 #include "content/common/navigation_params.h"
13 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
14 #include "content/public/browser/stream_handle.h" 15 #include "content/public/browser/stream_handle.h"
15 #include "content/public/common/resource_response.h" 16 #include "content/public/common/resource_response.h"
16 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
17 #include "net/url_request/redirect_info.h" 18 #include "net/url_request/redirect_info.h"
18 19
(...skipping 16 matching lines...) Expand all
35 } 36 }
36 37
37 void NavigationURLLoaderImplCore::Start( 38 void NavigationURLLoaderImplCore::Start(
38 ResourceContext* resource_context, 39 ResourceContext* resource_context,
39 int64 frame_tree_node_id, 40 int64 frame_tree_node_id,
40 const CommonNavigationParams& common_params, 41 const CommonNavigationParams& common_params,
41 scoped_ptr<NavigationRequestInfo> request_info, 42 scoped_ptr<NavigationRequestInfo> request_info,
42 ResourceRequestBody* request_body) { 43 ResourceRequestBody* request_body) {
43 DCHECK_CURRENTLY_ON(BrowserThread::IO); 44 DCHECK_CURRENTLY_ON(BrowserThread::IO);
44 45
46 BrowserThread::PostTask(
47 BrowserThread::UI, FROM_HERE,
48 base::Bind(&NavigationURLLoaderImpl::NotifyRequestStarted, loader_,
49 base::TimeTicks::Now()));
50
45 ResourceDispatcherHostImpl::Get()->BeginNavigationRequest( 51 ResourceDispatcherHostImpl::Get()->BeginNavigationRequest(
46 resource_context, frame_tree_node_id, 52 resource_context, frame_tree_node_id,
47 common_params, *request_info, request_body, 53 common_params, *request_info, request_body,
48 this); 54 this);
49 } 55 }
50 56
51 void NavigationURLLoaderImplCore::FollowRedirect() { 57 void NavigationURLLoaderImplCore::FollowRedirect() {
52 DCHECK_CURRENTLY_ON(BrowserThread::IO); 58 DCHECK_CURRENTLY_ON(BrowserThread::IO);
53 59
54 if (resource_handler_) 60 if (resource_handler_)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void NavigationURLLoaderImplCore::NotifyRequestFailed(int net_error) { 101 void NavigationURLLoaderImplCore::NotifyRequestFailed(int net_error) {
96 DCHECK_CURRENTLY_ON(BrowserThread::IO); 102 DCHECK_CURRENTLY_ON(BrowserThread::IO);
97 103
98 BrowserThread::PostTask( 104 BrowserThread::PostTask(
99 BrowserThread::UI, FROM_HERE, 105 BrowserThread::UI, FROM_HERE,
100 base::Bind(&NavigationURLLoaderImpl::NotifyRequestFailed, loader_, 106 base::Bind(&NavigationURLLoaderImpl::NotifyRequestFailed, loader_,
101 net_error)); 107 net_error));
102 } 108 }
103 109
104 } // namespace content 110 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_impl.cc ('k') | content/browser/loader/navigation_url_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698