| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); | 963 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); |
| 964 response->setExtraData(extra_data); | 964 response->setExtraData(extra_data); |
| 965 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); | 965 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); |
| 966 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); | 966 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); |
| 967 extra_data->set_was_alternate_protocol_available( | 967 extra_data->set_was_alternate_protocol_available( |
| 968 info.was_alternate_protocol_available); | 968 info.was_alternate_protocol_available); |
| 969 extra_data->set_connection_info(info.connection_info); | 969 extra_data->set_connection_info(info.connection_info); |
| 970 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); | 970 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); |
| 971 extra_data->set_proxy_server(info.proxy_server); | 971 extra_data->set_proxy_server(info.proxy_server); |
| 972 extra_data->set_is_using_lofi(info.is_using_lofi); | 972 extra_data->set_is_using_lofi(info.is_using_lofi); |
| 973 extra_data->set_used_data_reduction_proxy(info.used_data_reduction_proxy); |
| 973 | 974 |
| 974 // If there's no received headers end time, don't set load timing. This is | 975 // If there's no received headers end time, don't set load timing. This is |
| 975 // the case for non-HTTP requests, requests that don't go over the wire, and | 976 // the case for non-HTTP requests, requests that don't go over the wire, and |
| 976 // certain error cases. | 977 // certain error cases. |
| 977 if (!info.load_timing.receive_headers_end.is_null()) { | 978 if (!info.load_timing.receive_headers_end.is_null()) { |
| 978 WebURLLoadTiming timing; | 979 WebURLLoadTiming timing; |
| 979 PopulateURLLoadTiming(info.load_timing, &timing); | 980 PopulateURLLoadTiming(info.load_timing, &timing); |
| 980 const TimeTicks kNullTicks; | 981 const TimeTicks kNullTicks; |
| 981 timing.setWorkerStart( | 982 timing.setWorkerStart( |
| 982 (info.service_worker_start_time - kNullTicks).InSecondsF()); | 983 (info.service_worker_start_time - kNullTicks).InSecondsF()); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 } | 1138 } |
| 1138 | 1139 |
| 1139 void WebURLLoaderImpl::setLoadingTaskRunner( | 1140 void WebURLLoaderImpl::setLoadingTaskRunner( |
| 1140 blink::WebTaskRunner* loading_task_runner) { | 1141 blink::WebTaskRunner* loading_task_runner) { |
| 1141 // There's no guarantee on the lifetime of |loading_task_runner| so we take a | 1142 // There's no guarantee on the lifetime of |loading_task_runner| so we take a |
| 1142 // copy. | 1143 // copy. |
| 1143 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); | 1144 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); |
| 1144 } | 1145 } |
| 1145 | 1146 |
| 1146 } // namespace content | 1147 } // namespace content |
| OLD | NEW |