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/child/web_url_loader_impl.cc

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr comments and rebase Created 5 years, 2 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 | « content/child/resource_dispatcher.cc ('k') | content/child/weburlresponse_extradata_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/child/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 WebURLResponseExtraDataImpl* extra_data = 911 WebURLResponseExtraDataImpl* extra_data =
912 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); 912 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol);
913 response->setExtraData(extra_data); 913 response->setExtraData(extra_data);
914 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); 914 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy);
915 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); 915 extra_data->set_was_npn_negotiated(info.was_npn_negotiated);
916 extra_data->set_was_alternate_protocol_available( 916 extra_data->set_was_alternate_protocol_available(
917 info.was_alternate_protocol_available); 917 info.was_alternate_protocol_available);
918 extra_data->set_connection_info(info.connection_info); 918 extra_data->set_connection_info(info.connection_info);
919 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); 919 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy);
920 extra_data->set_proxy_server(info.proxy_server); 920 extra_data->set_proxy_server(info.proxy_server);
921 extra_data->set_is_using_lofi(info.is_using_lofi);
921 922
922 // If there's no received headers end time, don't set load timing. This is 923 // If there's no received headers end time, don't set load timing. This is
923 // the case for non-HTTP requests, requests that don't go over the wire, and 924 // the case for non-HTTP requests, requests that don't go over the wire, and
924 // certain error cases. 925 // certain error cases.
925 if (!info.load_timing.receive_headers_end.is_null()) { 926 if (!info.load_timing.receive_headers_end.is_null()) {
926 WebURLLoadTiming timing; 927 WebURLLoadTiming timing;
927 PopulateURLLoadTiming(info.load_timing, &timing); 928 PopulateURLLoadTiming(info.load_timing, &timing);
928 const TimeTicks kNullTicks; 929 const TimeTicks kNullTicks;
929 timing.setWorkerStart( 930 timing.setWorkerStart(
930 (info.service_worker_start_time - kNullTicks).InSecondsF()); 931 (info.service_worker_start_time - kNullTicks).InSecondsF());
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 } 1091 }
1091 1092
1092 void WebURLLoaderImpl::setLoadingTaskRunner( 1093 void WebURLLoaderImpl::setLoadingTaskRunner(
1093 blink::WebTaskRunner* loading_task_runner) { 1094 blink::WebTaskRunner* loading_task_runner) {
1094 // There's no guarantee on the lifetime of |loading_task_runner| so we take a 1095 // There's no guarantee on the lifetime of |loading_task_runner| so we take a
1095 // copy. 1096 // copy.
1096 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); 1097 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone()));
1097 } 1098 }
1098 1099
1099 } // namespace content 1100 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/weburlresponse_extradata_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698