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

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

Issue 2347163002: s/NPN/ALPN/ (Closed)
Patch Set: Re: #12. Created 4 years, 3 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 <openssl/ssl.h> 7 #include <openssl/ssl.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 info.cors_exposed_header_names.size()); 1004 info.cors_exposed_header_names.size());
1005 std::transform( 1005 std::transform(
1006 info.cors_exposed_header_names.begin(), 1006 info.cors_exposed_header_names.begin(),
1007 info.cors_exposed_header_names.end(), cors_exposed_header_names.begin(), 1007 info.cors_exposed_header_names.end(), cors_exposed_header_names.begin(),
1008 [](const std::string& h) { return blink::WebString::fromLatin1(h); }); 1008 [](const std::string& h) { return blink::WebString::fromLatin1(h); });
1009 response->setCorsExposedHeaderNames(cors_exposed_header_names); 1009 response->setCorsExposedHeaderNames(cors_exposed_header_names);
1010 1010
1011 SetSecurityStyleAndDetails(url, info, response, report_security_info); 1011 SetSecurityStyleAndDetails(url, info, response, report_security_info);
1012 1012
1013 WebURLResponseExtraDataImpl* extra_data = 1013 WebURLResponseExtraDataImpl* extra_data =
1014 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); 1014 new WebURLResponseExtraDataImpl(info.alpn_negotiated_protocol);
1015 response->setExtraData(extra_data); 1015 response->setExtraData(extra_data);
1016 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); 1016 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy);
1017 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); 1017 extra_data->set_was_alpn_negotiated(info.was_alpn_negotiated);
1018 extra_data->set_was_alternate_protocol_available( 1018 extra_data->set_was_alternate_protocol_available(
1019 info.was_alternate_protocol_available); 1019 info.was_alternate_protocol_available);
1020 extra_data->set_connection_info(info.connection_info); 1020 extra_data->set_connection_info(info.connection_info);
1021 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); 1021 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy);
1022 extra_data->set_proxy_server(info.proxy_server); 1022 extra_data->set_proxy_server(info.proxy_server);
1023 extra_data->set_is_using_lofi(info.is_using_lofi); 1023 extra_data->set_is_using_lofi(info.is_using_lofi);
1024 extra_data->set_effective_connection_type(info.effective_connection_type); 1024 extra_data->set_effective_connection_type(info.effective_connection_type);
1025 1025
1026 // If there's no received headers end time, don't set load timing. This is 1026 // If there's no received headers end time, don't set load timing. This is
1027 // the case for non-HTTP requests, requests that don't go over the wire, and 1027 // the case for non-HTTP requests, requests that don't go over the wire, and
(...skipping 27 matching lines...) Expand all
1055 load_info.addRequestHeader(WebString::fromLatin1(it->first), 1055 load_info.addRequestHeader(WebString::fromLatin1(it->first),
1056 WebString::fromLatin1(it->second)); 1056 WebString::fromLatin1(it->second));
1057 } 1057 }
1058 const HeadersVector& response_headers = 1058 const HeadersVector& response_headers =
1059 info.devtools_info->response_headers; 1059 info.devtools_info->response_headers;
1060 for (HeadersVector::const_iterator it = response_headers.begin(); 1060 for (HeadersVector::const_iterator it = response_headers.begin();
1061 it != response_headers.end(); ++it) { 1061 it != response_headers.end(); ++it) {
1062 load_info.addResponseHeader(WebString::fromLatin1(it->first), 1062 load_info.addResponseHeader(WebString::fromLatin1(it->first),
1063 WebString::fromLatin1(it->second)); 1063 WebString::fromLatin1(it->second));
1064 } 1064 }
1065 load_info.setNPNNegotiatedProtocol(WebString::fromLatin1( 1065 load_info.setNPNNegotiatedProtocol(
1066 info.npn_negotiated_protocol)); 1066 WebString::fromLatin1(info.alpn_negotiated_protocol));
1067 response->setHTTPLoadInfo(load_info); 1067 response->setHTTPLoadInfo(load_info);
1068 } 1068 }
1069 1069
1070 const net::HttpResponseHeaders* headers = info.headers.get(); 1070 const net::HttpResponseHeaders* headers = info.headers.get();
1071 if (!headers) 1071 if (!headers)
1072 return; 1072 return;
1073 1073
1074 WebURLResponse::HTTPVersion version = WebURLResponse::HTTPVersionUnknown; 1074 WebURLResponse::HTTPVersion version = WebURLResponse::HTTPVersionUnknown;
1075 if (headers->GetHttpVersion() == net::HttpVersion(0, 9)) 1075 if (headers->GetHttpVersion() == net::HttpVersion(0, 9))
1076 version = WebURLResponse::HTTPVersion_0_9; 1076 version = WebURLResponse::HTTPVersion_0_9;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 response->clearHTTPHeaderField(webStringName); 1242 response->clearHTTPHeaderField(webStringName);
1243 while (response_headers->EnumerateHeader(&iterator, name, &value)) { 1243 while (response_headers->EnumerateHeader(&iterator, name, &value)) {
1244 response->addHTTPHeaderField(webStringName, 1244 response->addHTTPHeaderField(webStringName,
1245 WebString::fromLatin1(value)); 1245 WebString::fromLatin1(value));
1246 } 1246 }
1247 } 1247 }
1248 return true; 1248 return true;
1249 } 1249 }
1250 1250
1251 } // namespace content 1251 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/child/weburlresponse_extradata_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698