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

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

Issue 2932003002: Implement nextHopProtocol in PerformanceResourceTiming and PerformanceNavigationTiming. (Closed)
Patch Set: Do not default to http/1.1; add github issue reference 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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 blink::WebVector<blink::WebString> cors_exposed_header_names( 1097 blink::WebVector<blink::WebString> cors_exposed_header_names(
1098 info.cors_exposed_header_names.size()); 1098 info.cors_exposed_header_names.size());
1099 std::transform( 1099 std::transform(
1100 info.cors_exposed_header_names.begin(), 1100 info.cors_exposed_header_names.begin(),
1101 info.cors_exposed_header_names.end(), cors_exposed_header_names.begin(), 1101 info.cors_exposed_header_names.end(), cors_exposed_header_names.begin(),
1102 [](const std::string& h) { return blink::WebString::FromLatin1(h); }); 1102 [](const std::string& h) { return blink::WebString::FromLatin1(h); });
1103 response->SetCorsExposedHeaderNames(cors_exposed_header_names); 1103 response->SetCorsExposedHeaderNames(cors_exposed_header_names);
1104 response->SetDidServiceWorkerNavigationPreload( 1104 response->SetDidServiceWorkerNavigationPreload(
1105 info.did_service_worker_navigation_preload); 1105 info.did_service_worker_navigation_preload);
1106 response->SetEncodedDataLength(info.encoded_data_length); 1106 response->SetEncodedDataLength(info.encoded_data_length);
1107 response->SetAlpnNegotiatedProtocol(
1108 WebString::FromUTF8(info.alpn_negotiated_protocol));
1109 response->SetConnectionInfo(info.connection_info);
1107 1110
1108 SetSecurityStyleAndDetails(url, info, response, report_security_info); 1111 SetSecurityStyleAndDetails(url, info, response, report_security_info);
1109 1112
1110 WebURLResponseExtraDataImpl* extra_data = 1113 WebURLResponseExtraDataImpl* extra_data = new WebURLResponseExtraDataImpl();
1111 new WebURLResponseExtraDataImpl(info.alpn_negotiated_protocol);
1112 response->SetExtraData(extra_data); 1114 response->SetExtraData(extra_data);
1113 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); 1115 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy);
1114 extra_data->set_was_alpn_negotiated(info.was_alpn_negotiated); 1116 extra_data->set_was_alpn_negotiated(info.was_alpn_negotiated);
1115 extra_data->set_was_alternate_protocol_available( 1117 extra_data->set_was_alternate_protocol_available(
1116 info.was_alternate_protocol_available); 1118 info.was_alternate_protocol_available);
1117 extra_data->set_connection_info(info.connection_info);
1118 extra_data->set_previews_state(info.previews_state); 1119 extra_data->set_previews_state(info.previews_state);
1119 extra_data->set_effective_connection_type(info.effective_connection_type); 1120 extra_data->set_effective_connection_type(info.effective_connection_type);
1120 1121
1121 // If there's no received headers end time, don't set load timing. This is 1122 // If there's no received headers end time, don't set load timing. This is
1122 // the case for non-HTTP requests, requests that don't go over the wire, and 1123 // the case for non-HTTP requests, requests that don't go over the wire, and
1123 // certain error cases. 1124 // certain error cases.
1124 if (!info.load_timing.receive_headers_end.is_null()) { 1125 if (!info.load_timing.receive_headers_end.is_null()) {
1125 WebURLLoadTiming timing; 1126 WebURLLoadTiming timing;
1126 PopulateURLLoadTiming(info.load_timing, &timing); 1127 PopulateURLLoadTiming(info.load_timing, &timing);
1127 const TimeTicks kNullTicks; 1128 const TimeTicks kNullTicks;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 int intra_priority_value) { 1277 int intra_priority_value) {
1277 context_->DidChangePriority(new_priority, intra_priority_value); 1278 context_->DidChangePriority(new_priority, intra_priority_value);
1278 } 1279 }
1279 1280
1280 void WebURLLoaderImpl::SetLoadingTaskRunner( 1281 void WebURLLoaderImpl::SetLoadingTaskRunner(
1281 base::SingleThreadTaskRunner* loading_task_runner) { 1282 base::SingleThreadTaskRunner* loading_task_runner) {
1282 context_->SetTaskRunner(loading_task_runner); 1283 context_->SetTaskRunner(loading_task_runner);
1283 } 1284 }
1284 1285
1285 } // namespace content 1286 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698