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

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

Issue 1146253004: Add workerReady timing for ServiceWorker controlled requests [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy; 56 response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy;
57 response->head.was_npn_negotiated = response_info.was_npn_negotiated; 57 response->head.was_npn_negotiated = response_info.was_npn_negotiated;
58 response->head.npn_negotiated_protocol = 58 response->head.npn_negotiated_protocol =
59 response_info.npn_negotiated_protocol; 59 response_info.npn_negotiated_protocol;
60 response->head.connection_info = response_info.connection_info; 60 response->head.connection_info = response_info.connection_info;
61 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy(); 61 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy();
62 response->head.proxy_server = response_info.proxy_server; 62 response->head.proxy_server = response_info.proxy_server;
63 response->head.socket_address = request->GetSocketAddress(); 63 response->head.socket_address = request->GetSocketAddress();
64 if (ServiceWorkerRequestHandler* handler = 64 if (ServiceWorkerRequestHandler* handler =
65 ServiceWorkerRequestHandler::GetHandler(request)) { 65 ServiceWorkerRequestHandler::GetHandler(request)) {
66 handler->GetExtraResponseInfo( 66 handler->GetExtraResponseInfo(&response->head);
67 &response->head.was_fetched_via_service_worker,
68 &response->head.was_fallback_required_by_service_worker,
69 &response->head.original_url_via_service_worker,
70 &response->head.response_type_via_service_worker,
71 &response->head.service_worker_start_time);
72 } 67 }
73 AppCacheInterceptor::GetExtraResponseInfo( 68 AppCacheInterceptor::GetExtraResponseInfo(
74 request, 69 request,
75 &response->head.appcache_id, 70 &response->head.appcache_id,
76 &response->head.appcache_manifest_url); 71 &response->head.appcache_manifest_url);
77 if (info->is_load_timing_enabled()) 72 if (info->is_load_timing_enabled())
78 request->GetLoadTimingInfo(&response->head.load_timing); 73 request->GetLoadTimingInfo(&response->head.load_timing);
79 } 74 }
80 75
81 } // namespace 76 } // namespace
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 case net::URLRequestStatus::FAILED: 761 case net::URLRequestStatus::FAILED:
767 status = STATUS_UNDEFINED; 762 status = STATUS_UNDEFINED;
768 break; 763 break;
769 } 764 }
770 765
771 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 766 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
772 } 767 }
773 } 768 }
774 769
775 } // namespace content 770 } // 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