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

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

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove log statement and fix ResponseInfo::DeepCopy Created 5 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
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/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
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;
davidben 2015/08/27 18:53:50 Without the embedder colluding, there's nothing en
bengr 2015/08/27 21:14:07 The header isn't really a header right now; it's a
davidben 2015/08/31 23:43:24 Can we make it a separate header and do it properl
bengr 2015/09/02 19:01:36 I see. We might be open to making a server change
megjablon 2015/09/02 21:25:41 @David, I'm not sure I follow completely. I unders
davidben 2015/09/04 14:41:22 I don't think //content should manage state that i
megjablon 2015/09/15 00:14:33 How will this work for the navigation? Since we ma
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698