| 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 985 |
| 986 // If there's no received headers end time, don't set load timing. This is | 986 // 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 | 987 // the case for non-HTTP requests, requests that don't go over the wire, and |
| 988 // certain error cases. | 988 // certain error cases. |
| 989 if (!info.load_timing.receive_headers_end.is_null()) { | 989 if (!info.load_timing.receive_headers_end.is_null()) { |
| 990 WebURLLoadTiming timing; | 990 WebURLLoadTiming timing; |
| 991 PopulateURLLoadTiming(info.load_timing, &timing); | 991 PopulateURLLoadTiming(info.load_timing, &timing); |
| 992 const TimeTicks kNullTicks; | 992 const TimeTicks kNullTicks; |
| 993 timing.setServiceWorkerFetchStart( | 993 timing.setWorkerStart( |
| 994 (info.service_worker_fetch_start - kNullTicks).InSecondsF()); | 994 (info.service_worker_start_time - kNullTicks).InSecondsF()); |
| 995 timing.setServiceWorkerFetchReady( | |
| 996 (info.service_worker_fetch_ready - kNullTicks).InSecondsF()); | |
| 997 timing.setServiceWorkerFetchEnd( | |
| 998 (info.service_worker_fetch_end - kNullTicks).InSecondsF()); | |
| 999 response->setLoadTiming(timing); | 995 response->setLoadTiming(timing); |
| 1000 } | 996 } |
| 1001 | 997 |
| 1002 if (info.devtools_info.get()) { | 998 if (info.devtools_info.get()) { |
| 1003 WebHTTPLoadInfo load_info; | 999 WebHTTPLoadInfo load_info; |
| 1004 | 1000 |
| 1005 load_info.setHTTPStatusCode(info.devtools_info->http_status_code); | 1001 load_info.setHTTPStatusCode(info.devtools_info->http_status_code); |
| 1006 load_info.setHTTPStatusText(WebString::fromLatin1( | 1002 load_info.setHTTPStatusText(WebString::fromLatin1( |
| 1007 info.devtools_info->http_status_text)); | 1003 info.devtools_info->http_status_text)); |
| 1008 load_info.setEncodedDataLength(info.encoded_data_length); | 1004 load_info.setEncodedDataLength(info.encoded_data_length); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 int intra_priority_value) { | 1113 int intra_priority_value) { |
| 1118 context_->DidChangePriority(new_priority, intra_priority_value); | 1114 context_->DidChangePriority(new_priority, intra_priority_value); |
| 1119 } | 1115 } |
| 1120 | 1116 |
| 1121 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1117 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
| 1122 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1118 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
| 1123 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1119 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
| 1124 } | 1120 } |
| 1125 | 1121 |
| 1126 } // namespace content | 1122 } // namespace content |
| OLD | NEW |