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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 WebURLResponseExtraDataImpl* extra_data = | 911 WebURLResponseExtraDataImpl* extra_data = |
912 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); | 912 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); |
913 response->setExtraData(extra_data); | 913 response->setExtraData(extra_data); |
914 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); | 914 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); |
915 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); | 915 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); |
916 extra_data->set_was_alternate_protocol_available( | 916 extra_data->set_was_alternate_protocol_available( |
917 info.was_alternate_protocol_available); | 917 info.was_alternate_protocol_available); |
918 extra_data->set_connection_info(info.connection_info); | 918 extra_data->set_connection_info(info.connection_info); |
919 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); | 919 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); |
920 extra_data->set_proxy_server(info.proxy_server); | 920 extra_data->set_proxy_server(info.proxy_server); |
| 921 extra_data->set_is_using_lofi(info.is_using_lofi); |
921 | 922 |
922 // If there's no received headers end time, don't set load timing. This is | 923 // If there's no received headers end time, don't set load timing. This is |
923 // the case for non-HTTP requests, requests that don't go over the wire, and | 924 // the case for non-HTTP requests, requests that don't go over the wire, and |
924 // certain error cases. | 925 // certain error cases. |
925 if (!info.load_timing.receive_headers_end.is_null()) { | 926 if (!info.load_timing.receive_headers_end.is_null()) { |
926 WebURLLoadTiming timing; | 927 WebURLLoadTiming timing; |
927 PopulateURLLoadTiming(info.load_timing, &timing); | 928 PopulateURLLoadTiming(info.load_timing, &timing); |
928 const TimeTicks kNullTicks; | 929 const TimeTicks kNullTicks; |
929 timing.setWorkerStart( | 930 timing.setWorkerStart( |
930 (info.service_worker_start_time - kNullTicks).InSecondsF()); | 931 (info.service_worker_start_time - kNullTicks).InSecondsF()); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 } | 1091 } |
1091 | 1092 |
1092 void WebURLLoaderImpl::setLoadingTaskRunner( | 1093 void WebURLLoaderImpl::setLoadingTaskRunner( |
1093 blink::WebTaskRunner* loading_task_runner) { | 1094 blink::WebTaskRunner* loading_task_runner) { |
1094 // There's no guarantee on the lifetime of |loading_task_runner| so we take a | 1095 // There's no guarantee on the lifetime of |loading_task_runner| so we take a |
1095 // copy. | 1096 // copy. |
1096 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); | 1097 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); |
1097 } | 1098 } |
1098 | 1099 |
1099 } // namespace content | 1100 } // namespace content |
OLD | NEW |