OLD | NEW |
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/location.h" | 8 #include "base/location.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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 request->GetMimeType(&response->head.mime_type); | 87 request->GetMimeType(&response->head.mime_type); |
88 net::HttpResponseInfo response_info = request->response_info(); | 88 net::HttpResponseInfo response_info = request->response_info(); |
89 response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy; | 89 response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy; |
90 response->head.was_npn_negotiated = response_info.was_npn_negotiated; | 90 response->head.was_npn_negotiated = response_info.was_npn_negotiated; |
91 response->head.npn_negotiated_protocol = | 91 response->head.npn_negotiated_protocol = |
92 response_info.npn_negotiated_protocol; | 92 response_info.npn_negotiated_protocol; |
93 response->head.connection_info = response_info.connection_info; | 93 response->head.connection_info = response_info.connection_info; |
94 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy(); | 94 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy(); |
95 response->head.proxy_server = response_info.proxy_server; | 95 response->head.proxy_server = response_info.proxy_server; |
96 response->head.socket_address = request->GetSocketAddress(); | 96 response->head.socket_address = request->GetSocketAddress(); |
| 97 response->head.is_lofi = request->lofi_state() == net::LOFI_ON; |
97 if (ServiceWorkerRequestHandler* handler = | 98 if (ServiceWorkerRequestHandler* handler = |
98 ServiceWorkerRequestHandler::GetHandler(request)) { | 99 ServiceWorkerRequestHandler::GetHandler(request)) { |
99 handler->GetExtraResponseInfo(&response->head); | 100 handler->GetExtraResponseInfo(&response->head); |
100 } | 101 } |
101 AppCacheInterceptor::GetExtraResponseInfo( | 102 AppCacheInterceptor::GetExtraResponseInfo( |
102 request, &response->head.appcache_id, | 103 request, &response->head.appcache_id, |
103 &response->head.appcache_manifest_url); | 104 &response->head.appcache_manifest_url); |
104 if (info->is_load_timing_enabled()) | 105 if (info->is_load_timing_enabled()) |
105 request->GetLoadTimingInfo(&response->head.load_timing); | 106 request->GetLoadTimingInfo(&response->head.load_timing); |
106 | 107 |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 case net::URLRequestStatus::FAILED: | 697 case net::URLRequestStatus::FAILED: |
697 status = STATUS_UNDEFINED; | 698 status = STATUS_UNDEFINED; |
698 break; | 699 break; |
699 } | 700 } |
700 | 701 |
701 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 702 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
702 } | 703 } |
703 } | 704 } |
704 | 705 |
705 } // namespace content | 706 } // namespace content |
OLD | NEW |