Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 1157823003: Refactoring timing info for ServiceWorker controlled requests [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698