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

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 515753003: Add ServiceWorker timing information on the popup panel in DevTools's Network tab (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 | « no previous file | content/browser/service_worker/service_worker_context_request_handler.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 response->head.was_npn_negotiated = response_info.was_npn_negotiated; 53 response->head.was_npn_negotiated = response_info.was_npn_negotiated;
54 response->head.npn_negotiated_protocol = 54 response->head.npn_negotiated_protocol =
55 response_info.npn_negotiated_protocol; 55 response_info.npn_negotiated_protocol;
56 response->head.connection_info = response_info.connection_info; 56 response->head.connection_info = response_info.connection_info;
57 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy(); 57 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy();
58 response->head.socket_address = request->GetSocketAddress(); 58 response->head.socket_address = request->GetSocketAddress();
59 if (ServiceWorkerRequestHandler* handler = 59 if (ServiceWorkerRequestHandler* handler =
60 ServiceWorkerRequestHandler::GetHandler(request)) { 60 ServiceWorkerRequestHandler::GetHandler(request)) {
61 handler->GetExtraResponseInfo( 61 handler->GetExtraResponseInfo(
62 &response->head.was_fetched_via_service_worker, 62 &response->head.was_fetched_via_service_worker,
63 &response->head.original_url_via_service_worker); 63 &response->head.original_url_via_service_worker,
64 &response->head.service_worker_fetch_start,
65 &response->head.service_worker_fetch_ready,
66 &response->head.service_worker_fetch_end);
64 } 67 }
65 AppCacheInterceptor::GetExtraResponseInfo( 68 AppCacheInterceptor::GetExtraResponseInfo(
66 request, 69 request,
67 &response->head.appcache_id, 70 &response->head.appcache_id,
68 &response->head.appcache_manifest_url); 71 &response->head.appcache_manifest_url);
69 if (info->is_load_timing_enabled()) 72 if (info->is_load_timing_enabled())
70 request->GetLoadTimingInfo(&response->head.load_timing); 73 request->GetLoadTimingInfo(&response->head.load_timing);
71 } 74 }
72 75
73 } // namespace 76 } // namespace
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 case net::URLRequestStatus::FAILED: 706 case net::URLRequestStatus::FAILED:
704 status = STATUS_UNDEFINED; 707 status = STATUS_UNDEFINED;
705 break; 708 break;
706 } 709 }
707 710
708 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 711 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
709 } 712 }
710 } 713 }
711 714
712 } // namespace content 715 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_context_request_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698