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 <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
975 WebURLResponseExtraDataImpl* extra_data = | 975 WebURLResponseExtraDataImpl* extra_data = |
976 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); | 976 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); |
977 response->setExtraData(extra_data); | 977 response->setExtraData(extra_data); |
978 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); | 978 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); |
979 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); | 979 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); |
980 extra_data->set_was_alternate_protocol_available( | 980 extra_data->set_was_alternate_protocol_available( |
981 info.was_alternate_protocol_available); | 981 info.was_alternate_protocol_available); |
982 extra_data->set_connection_info(info.connection_info); | 982 extra_data->set_connection_info(info.connection_info); |
983 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); | 983 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); |
984 extra_data->set_proxy_server(info.proxy_server); | 984 extra_data->set_proxy_server(info.proxy_server); |
985 if (info.headers) { | |
986 extra_data->set_was_fetched_lo_fi( | |
987 info.headers->HasHeaderValue("Chrome-Proxy", "q=low")); | |
Charlie Reis
2015/05/11 22:32:58
It's not clear to me that this belongs in content/
megjablon
2015/05/11 22:58:40
Acknowledged.
jam
2015/05/11 22:59:47
i agree that this shouldn't go in content; seeing
| |
988 } | |
985 | 989 |
986 // If there's no received headers end time, don't set load timing. This is | 990 // If there's no received headers end time, don't set load timing. This is |
987 // the case for non-HTTP requests, requests that don't go over the wire, and | 991 // the case for non-HTTP requests, requests that don't go over the wire, and |
988 // certain error cases. | 992 // certain error cases. |
989 if (!info.load_timing.receive_headers_end.is_null()) { | 993 if (!info.load_timing.receive_headers_end.is_null()) { |
990 WebURLLoadTiming timing; | 994 WebURLLoadTiming timing; |
991 PopulateURLLoadTiming(info.load_timing, &timing); | 995 PopulateURLLoadTiming(info.load_timing, &timing); |
992 const TimeTicks kNullTicks; | 996 const TimeTicks kNullTicks; |
993 timing.setServiceWorkerFetchStart( | 997 timing.setServiceWorkerFetchStart( |
994 (info.service_worker_fetch_start - kNullTicks).InSecondsF()); | 998 (info.service_worker_fetch_start - kNullTicks).InSecondsF()); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1117 int intra_priority_value) { | 1121 int intra_priority_value) { |
1118 context_->DidChangePriority(new_priority, intra_priority_value); | 1122 context_->DidChangePriority(new_priority, intra_priority_value); |
1119 } | 1123 } |
1120 | 1124 |
1121 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1125 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
1122 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1126 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
1123 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1127 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
1124 } | 1128 } |
1125 | 1129 |
1126 } // namespace content | 1130 } // namespace content |
OLD | NEW |