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

Side by Side Diff: content/child/web_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: Created a DRP PageLoadMetricsObserver Created 4 years, 9 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/child/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); 974 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol);
975 response->setExtraData(extra_data); 975 response->setExtraData(extra_data);
976 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); 976 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy);
977 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); 977 extra_data->set_was_npn_negotiated(info.was_npn_negotiated);
978 extra_data->set_was_alternate_protocol_available( 978 extra_data->set_was_alternate_protocol_available(
979 info.was_alternate_protocol_available); 979 info.was_alternate_protocol_available);
980 extra_data->set_connection_info(info.connection_info); 980 extra_data->set_connection_info(info.connection_info);
981 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); 981 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy);
982 extra_data->set_proxy_server(info.proxy_server); 982 extra_data->set_proxy_server(info.proxy_server);
983 extra_data->set_is_using_lofi(info.is_using_lofi); 983 extra_data->set_is_using_lofi(info.is_using_lofi);
984 extra_data->set_used_data_reduction_proxy(info.used_data_reduction_proxy);
984 985
985 // If there's no received headers end time, don't set load timing. This is 986 // If there's no received headers end time, don't set load timing. This is
986 // the case for non-HTTP requests, requests that don't go over the wire, and 987 // the case for non-HTTP requests, requests that don't go over the wire, and
987 // certain error cases. 988 // certain error cases.
988 if (!info.load_timing.receive_headers_end.is_null()) { 989 if (!info.load_timing.receive_headers_end.is_null()) {
989 WebURLLoadTiming timing; 990 WebURLLoadTiming timing;
990 PopulateURLLoadTiming(info.load_timing, &timing); 991 PopulateURLLoadTiming(info.load_timing, &timing);
991 const TimeTicks kNullTicks; 992 const TimeTicks kNullTicks;
992 timing.setWorkerStart( 993 timing.setWorkerStart(
993 (info.service_worker_start_time - kNullTicks).InSecondsF()); 994 (info.service_worker_start_time - kNullTicks).InSecondsF());
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 } 1154 }
1154 1155
1155 void WebURLLoaderImpl::setLoadingTaskRunner( 1156 void WebURLLoaderImpl::setLoadingTaskRunner(
1156 blink::WebTaskRunner* loading_task_runner) { 1157 blink::WebTaskRunner* loading_task_runner) {
1157 // There's no guarantee on the lifetime of |loading_task_runner| so we take a 1158 // There's no guarantee on the lifetime of |loading_task_runner| so we take a
1158 // copy. 1159 // copy.
1159 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); 1160 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone()));
1160 } 1161 }
1161 1162
1162 } // namespace content 1163 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698