Chromium Code Reviews| 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/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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 net::HttpResponseInfo response_info = request->response_info(); | 55 net::HttpResponseInfo response_info = request->response_info(); |
| 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); |
|
mmenke
2015/06/08 02:08:42
nit: Should still use braces, because the conditi
Kunihiko Sakamoto
2015/06/08 02:25:57
Done.
| |
| 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 } | |
| 73 AppCacheInterceptor::GetExtraResponseInfo( | 67 AppCacheInterceptor::GetExtraResponseInfo( |
| 74 request, | 68 request, |
| 75 &response->head.appcache_id, | 69 &response->head.appcache_id, |
| 76 &response->head.appcache_manifest_url); | 70 &response->head.appcache_manifest_url); |
| 77 if (info->is_load_timing_enabled()) | 71 if (info->is_load_timing_enabled()) |
| 78 request->GetLoadTimingInfo(&response->head.load_timing); | 72 request->GetLoadTimingInfo(&response->head.load_timing); |
| 79 } | 73 } |
| 80 | 74 |
| 81 } // namespace | 75 } // namespace |
| 82 | 76 |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 766 case net::URLRequestStatus::FAILED: | 760 case net::URLRequestStatus::FAILED: |
| 767 status = STATUS_UNDEFINED; | 761 status = STATUS_UNDEFINED; |
| 768 break; | 762 break; |
| 769 } | 763 } |
| 770 | 764 |
| 771 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 765 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
| 772 } | 766 } |
| 773 } | 767 } |
| 774 | 768 |
| 775 } // namespace content | 769 } // namespace content |
| OLD | NEW |