| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 request->GetMimeType(&response->head.mime_type); | 95 request->GetMimeType(&response->head.mime_type); |
| 96 net::HttpResponseInfo response_info = request->response_info(); | 96 net::HttpResponseInfo response_info = request->response_info(); |
| 97 response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy; | 97 response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy; |
| 98 response->head.was_npn_negotiated = response_info.was_npn_negotiated; | 98 response->head.was_npn_negotiated = response_info.was_npn_negotiated; |
| 99 response->head.npn_negotiated_protocol = | 99 response->head.npn_negotiated_protocol = |
| 100 response_info.npn_negotiated_protocol; | 100 response_info.npn_negotiated_protocol; |
| 101 response->head.connection_info = response_info.connection_info; | 101 response->head.connection_info = response_info.connection_info; |
| 102 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy(); | 102 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy(); |
| 103 response->head.proxy_server = response_info.proxy_server; | 103 response->head.proxy_server = response_info.proxy_server; |
| 104 response->head.socket_address = request->GetSocketAddress(); | 104 response->head.socket_address = request->GetSocketAddress(); |
| 105 response->head.is_lofi = request->lofi_state() == net::LOFI_ON; |
| 105 if (ServiceWorkerRequestHandler* handler = | 106 if (ServiceWorkerRequestHandler* handler = |
| 106 ServiceWorkerRequestHandler::GetHandler(request)) { | 107 ServiceWorkerRequestHandler::GetHandler(request)) { |
| 107 handler->GetExtraResponseInfo(&response->head); | 108 handler->GetExtraResponseInfo(&response->head); |
| 108 } | 109 } |
| 109 AppCacheInterceptor::GetExtraResponseInfo( | 110 AppCacheInterceptor::GetExtraResponseInfo( |
| 110 request, &response->head.appcache_id, | 111 request, &response->head.appcache_id, |
| 111 &response->head.appcache_manifest_url); | 112 &response->head.appcache_manifest_url); |
| 112 if (info->is_load_timing_enabled()) | 113 if (info->is_load_timing_enabled()) |
| 113 request->GetLoadTimingInfo(&response->head.load_timing); | 114 request->GetLoadTimingInfo(&response->head.load_timing); |
| 114 | 115 |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 case net::URLRequestStatus::FAILED: | 763 case net::URLRequestStatus::FAILED: |
| 763 status = STATUS_UNDEFINED; | 764 status = STATUS_UNDEFINED; |
| 764 break; | 765 break; |
| 765 } | 766 } |
| 766 | 767 |
| 767 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 768 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
| 768 } | 769 } |
| 769 } | 770 } |
| 770 | 771 |
| 771 } // namespace content | 772 } // namespace content |
| OLD | NEW |