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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 return; 1224 return;
1225 } 1225 }
1226 1226
1227 // Construct the request. 1227 // Construct the request.
1228 scoped_ptr<net::URLRequest> new_request = request_context->CreateRequest( 1228 scoped_ptr<net::URLRequest> new_request = request_context->CreateRequest(
1229 request_data.url, request_data.priority, NULL); 1229 request_data.url, request_data.priority, NULL);
1230 1230
1231 new_request->set_method(request_data.method); 1231 new_request->set_method(request_data.method);
1232 new_request->set_first_party_for_cookies( 1232 new_request->set_first_party_for_cookies(
1233 request_data.first_party_for_cookies); 1233 request_data.first_party_for_cookies);
1234 new_request->set_lofi_state((net::LoFiState) request_data.lofi_state);
davidben 2015/08/27 18:53:50 Use C++-style static_cast<net::LofiState> in Chrom
megjablon 2015/08/27 23:11:02 Done.
1234 1235
1235 // If the request is a MAIN_FRAME request, the first-party URL gets updated on 1236 // If the request is a MAIN_FRAME request, the first-party URL gets updated on
1236 // redirects. 1237 // redirects.
1237 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME) { 1238 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME) {
1238 new_request->set_first_party_url_policy( 1239 new_request->set_first_party_url_policy(
1239 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT); 1240 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT);
1240 } 1241 }
1241 1242
1242 const Referrer referrer(request_data.referrer, request_data.referrer_policy); 1243 const Referrer referrer(request_data.referrer, request_data.referrer_policy);
1243 SetReferrerForRequest(new_request.get(), referrer); 1244 SetReferrerForRequest(new_request.get(), referrer);
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) 2404 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS)
2404 && !policy->CanReadRawCookies(child_id)) { 2405 && !policy->CanReadRawCookies(child_id)) {
2405 VLOG(1) << "Denied unauthorized request for raw headers"; 2406 VLOG(1) << "Denied unauthorized request for raw headers";
2406 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; 2407 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS;
2407 } 2408 }
2408 2409
2409 return load_flags; 2410 return load_flags;
2410 } 2411 }
2411 2412
2412 } // namespace content 2413 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698