OLD | NEW |
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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 SetSecurityStyleAndDetails(url, info, response, report_security_info); | 1020 SetSecurityStyleAndDetails(url, info, response, report_security_info); |
1021 | 1021 |
1022 WebURLResponseExtraDataImpl* extra_data = | 1022 WebURLResponseExtraDataImpl* extra_data = |
1023 new WebURLResponseExtraDataImpl(info.alpn_negotiated_protocol); | 1023 new WebURLResponseExtraDataImpl(info.alpn_negotiated_protocol); |
1024 response->setExtraData(extra_data); | 1024 response->setExtraData(extra_data); |
1025 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); | 1025 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); |
1026 extra_data->set_was_alpn_negotiated(info.was_alpn_negotiated); | 1026 extra_data->set_was_alpn_negotiated(info.was_alpn_negotiated); |
1027 extra_data->set_was_alternate_protocol_available( | 1027 extra_data->set_was_alternate_protocol_available( |
1028 info.was_alternate_protocol_available); | 1028 info.was_alternate_protocol_available); |
1029 extra_data->set_connection_info(info.connection_info); | 1029 extra_data->set_connection_info(info.connection_info); |
1030 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); | |
1031 extra_data->set_proxy_server(info.proxy_server); | |
1032 extra_data->set_is_using_lofi(info.is_using_lofi); | 1030 extra_data->set_is_using_lofi(info.is_using_lofi); |
1033 extra_data->set_effective_connection_type(info.effective_connection_type); | 1031 extra_data->set_effective_connection_type(info.effective_connection_type); |
1034 | 1032 |
1035 // If there's no received headers end time, don't set load timing. This is | 1033 // If there's no received headers end time, don't set load timing. This is |
1036 // the case for non-HTTP requests, requests that don't go over the wire, and | 1034 // the case for non-HTTP requests, requests that don't go over the wire, and |
1037 // certain error cases. | 1035 // certain error cases. |
1038 if (!info.load_timing.receive_headers_end.is_null()) { | 1036 if (!info.load_timing.receive_headers_end.is_null()) { |
1039 WebURLLoadTiming timing; | 1037 WebURLLoadTiming timing; |
1040 PopulateURLLoadTiming(info.load_timing, &timing); | 1038 PopulateURLLoadTiming(info.load_timing, &timing); |
1041 const TimeTicks kNullTicks; | 1039 const TimeTicks kNullTicks; |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 response->clearHTTPHeaderField(webStringName); | 1249 response->clearHTTPHeaderField(webStringName); |
1252 while (response_headers->EnumerateHeader(&iterator, name, &value)) { | 1250 while (response_headers->EnumerateHeader(&iterator, name, &value)) { |
1253 response->addHTTPHeaderField(webStringName, | 1251 response->addHTTPHeaderField(webStringName, |
1254 WebString::fromLatin1(value)); | 1252 WebString::fromLatin1(value)); |
1255 } | 1253 } |
1256 } | 1254 } |
1257 return true; | 1255 return true; |
1258 } | 1256 } |
1259 | 1257 |
1260 } // namespace content | 1258 } // namespace content |
OLD | NEW |