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

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

Issue 1721813002: Adding DRP specfic UMA for FirstContentfulPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 7 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.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"
11 #include "base/trace_event/trace_event.h" 11 #include "base/trace_event/trace_event.h"
12 #include "content/browser/frame_host/navigation_request_info.h" 12 #include "content/browser/frame_host/navigation_request_info.h"
13 #include "content/browser/loader/navigation_url_loader_delegate.h" 13 #include "content/browser/loader/navigation_url_loader_delegate.h"
14 #include "content/browser/loader/navigation_url_loader_impl_core.h" 14 #include "content/browser/loader/navigation_url_loader_impl_core.h"
15 #include "content/browser/service_worker/service_worker_navigation_handle.h" 15 #include "content/browser/service_worker/service_worker_navigation_handle.h"
16 #include "content/public/browser/browser_context.h" 16 #include "content/public/browser/browser_context.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/navigation_data.h"
18 #include "content/public/browser/stream_handle.h" 19 #include "content/public/browser/stream_handle.h"
19 20
20 namespace content { 21 namespace content {
21 22
22 NavigationURLLoaderImpl::NavigationURLLoaderImpl( 23 NavigationURLLoaderImpl::NavigationURLLoaderImpl(
23 BrowserContext* browser_context, 24 BrowserContext* browser_context,
24 std::unique_ptr<NavigationRequestInfo> request_info, 25 std::unique_ptr<NavigationRequestInfo> request_info,
25 ServiceWorkerNavigationHandle* service_worker_handle, 26 ServiceWorkerNavigationHandle* service_worker_handle,
26 NavigationURLLoaderDelegate* delegate) 27 NavigationURLLoaderDelegate* delegate)
27 : delegate_(delegate), weak_factory_(this) { 28 : delegate_(delegate), weak_factory_(this) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void NavigationURLLoaderImpl::NotifyRequestRedirected( 75 void NavigationURLLoaderImpl::NotifyRequestRedirected(
75 const net::RedirectInfo& redirect_info, 76 const net::RedirectInfo& redirect_info,
76 const scoped_refptr<ResourceResponse>& response) { 77 const scoped_refptr<ResourceResponse>& response) {
77 DCHECK_CURRENTLY_ON(BrowserThread::UI); 78 DCHECK_CURRENTLY_ON(BrowserThread::UI);
78 79
79 delegate_->OnRequestRedirected(redirect_info, response); 80 delegate_->OnRequestRedirected(redirect_info, response);
80 } 81 }
81 82
82 void NavigationURLLoaderImpl::NotifyResponseStarted( 83 void NavigationURLLoaderImpl::NotifyResponseStarted(
83 const scoped_refptr<ResourceResponse>& response, 84 const scoped_refptr<ResourceResponse>& response,
84 std::unique_ptr<StreamHandle> body) { 85 std::unique_ptr<StreamHandle> body,
86 std::unique_ptr<NavigationData> navigation_data) {
85 DCHECK_CURRENTLY_ON(BrowserThread::UI); 87 DCHECK_CURRENTLY_ON(BrowserThread::UI);
86 88
87 delegate_->OnResponseStarted(response, std::move(body)); 89 delegate_->OnResponseStarted(response, std::move(body),
90 std::move(navigation_data));
88 } 91 }
89 92
90 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache, 93 void NavigationURLLoaderImpl::NotifyRequestFailed(bool in_cache,
91 int net_error) { 94 int net_error) {
92 DCHECK_CURRENTLY_ON(BrowserThread::UI); 95 DCHECK_CURRENTLY_ON(BrowserThread::UI);
93 96
94 delegate_->OnRequestFailed(in_cache, net_error); 97 delegate_->OnRequestFailed(in_cache, net_error);
95 } 98 }
96 99
97 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) { 100 void NavigationURLLoaderImpl::NotifyRequestStarted(base::TimeTicks timestamp) {
98 DCHECK_CURRENTLY_ON(BrowserThread::UI); 101 DCHECK_CURRENTLY_ON(BrowserThread::UI);
99 102
100 delegate_->OnRequestStarted(timestamp); 103 delegate_->OnRequestStarted(timestamp);
101 } 104 }
102 105
103 } // namespace content 106 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_impl.h ('k') | content/browser/loader/navigation_url_loader_impl_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698