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

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 2932003002: Implement nextHopProtocol in PerformanceResourceTiming and PerformanceNavigationTiming. (Closed)
Patch Set: Added net/http dependency Created 3 years, 6 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 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 blink::WebVector<blink::WebString> cors_exposed_header_names( 1109 blink::WebVector<blink::WebString> cors_exposed_header_names(
1110 info.cors_exposed_header_names.size()); 1110 info.cors_exposed_header_names.size());
1111 std::transform( 1111 std::transform(
1112 info.cors_exposed_header_names.begin(), 1112 info.cors_exposed_header_names.begin(),
1113 info.cors_exposed_header_names.end(), cors_exposed_header_names.begin(), 1113 info.cors_exposed_header_names.end(), cors_exposed_header_names.begin(),
1114 [](const std::string& h) { return blink::WebString::FromLatin1(h); }); 1114 [](const std::string& h) { return blink::WebString::FromLatin1(h); });
1115 response->SetCorsExposedHeaderNames(cors_exposed_header_names); 1115 response->SetCorsExposedHeaderNames(cors_exposed_header_names);
1116 response->SetDidServiceWorkerNavigationPreload( 1116 response->SetDidServiceWorkerNavigationPreload(
1117 info.did_service_worker_navigation_preload); 1117 info.did_service_worker_navigation_preload);
1118 response->SetEncodedDataLength(info.encoded_data_length); 1118 response->SetEncodedDataLength(info.encoded_data_length);
1119 response->SetAlpnNegotiatedProtocol(
1120 WebString::FromUTF8(info.alpn_negotiated_protocol));
1121 response->SetConnectionInfo(info.connection_info);
1119 1122
1120 SetSecurityStyleAndDetails(url, info, response, report_security_info); 1123 SetSecurityStyleAndDetails(url, info, response, report_security_info);
1121 1124
1122 WebURLResponseExtraDataImpl* extra_data = 1125 WebURLResponseExtraDataImpl* extra_data = new WebURLResponseExtraDataImpl();
1123 new WebURLResponseExtraDataImpl(info.alpn_negotiated_protocol);
1124 response->SetExtraData(extra_data); 1126 response->SetExtraData(extra_data);
1125 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); 1127 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy);
1126 extra_data->set_was_alpn_negotiated(info.was_alpn_negotiated); 1128 extra_data->set_was_alpn_negotiated(info.was_alpn_negotiated);
1127 extra_data->set_was_alternate_protocol_available( 1129 extra_data->set_was_alternate_protocol_available(
1128 info.was_alternate_protocol_available); 1130 info.was_alternate_protocol_available);
1129 extra_data->set_connection_info(info.connection_info);
1130 extra_data->set_previews_state(info.previews_state); 1131 extra_data->set_previews_state(info.previews_state);
1131 extra_data->set_effective_connection_type(info.effective_connection_type); 1132 extra_data->set_effective_connection_type(info.effective_connection_type);
1132 1133
1133 // If there's no received headers end time, don't set load timing. This is 1134 // If there's no received headers end time, don't set load timing. This is
1134 // the case for non-HTTP requests, requests that don't go over the wire, and 1135 // the case for non-HTTP requests, requests that don't go over the wire, and
1135 // certain error cases. 1136 // certain error cases.
1136 if (!info.load_timing.receive_headers_end.is_null()) { 1137 if (!info.load_timing.receive_headers_end.is_null()) {
1137 WebURLLoadTiming timing; 1138 WebURLLoadTiming timing;
1138 PopulateURLLoadTiming(info.load_timing, &timing); 1139 PopulateURLLoadTiming(info.load_timing, &timing);
1139 const TimeTicks kNullTicks; 1140 const TimeTicks kNullTicks;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 int intra_priority_value) { 1289 int intra_priority_value) {
1289 context_->DidChangePriority(new_priority, intra_priority_value); 1290 context_->DidChangePriority(new_priority, intra_priority_value);
1290 } 1291 }
1291 1292
1292 void WebURLLoaderImpl::SetLoadingTaskRunner( 1293 void WebURLLoaderImpl::SetLoadingTaskRunner(
1293 base::SingleThreadTaskRunner* loading_task_runner) { 1294 base::SingleThreadTaskRunner* loading_task_runner) {
1294 context_->SetTaskRunner(loading_task_runner); 1295 context_->SetTaskRunner(loading_task_runner);
1295 } 1296 }
1296 1297
1297 } // namespace content 1298 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698