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

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: test fixes 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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 return; 1210 return;
1211 } 1211 }
1212 1212
1213 // Construct the request. 1213 // Construct the request.
1214 scoped_ptr<net::URLRequest> new_request = request_context->CreateRequest( 1214 scoped_ptr<net::URLRequest> new_request = request_context->CreateRequest(
1215 request_data.url, request_data.priority, NULL); 1215 request_data.url, request_data.priority, NULL);
1216 1216
1217 new_request->set_method(request_data.method); 1217 new_request->set_method(request_data.method);
1218 new_request->set_first_party_for_cookies( 1218 new_request->set_first_party_for_cookies(
1219 request_data.first_party_for_cookies); 1219 request_data.first_party_for_cookies);
1220 new_request->set_lofi_state((net::LoFiState) request_data.lofi_state);
1220 1221
1221 // If the request is a MAIN_FRAME request, the first-party URL gets updated on 1222 // If the request is a MAIN_FRAME request, the first-party URL gets updated on
1222 // redirects. 1223 // redirects.
1223 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME) { 1224 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME) {
1224 new_request->set_first_party_url_policy( 1225 new_request->set_first_party_url_policy(
1225 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT); 1226 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT);
1226 } 1227 }
1227 1228
1228 const Referrer referrer(request_data.referrer, request_data.referrer_policy); 1229 const Referrer referrer(request_data.referrer, request_data.referrer_policy);
1229 SetReferrerForRequest(new_request.get(), referrer); 1230 SetReferrerForRequest(new_request.get(), referrer);
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) 2387 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS)
2387 && !policy->CanReadRawCookies(child_id)) { 2388 && !policy->CanReadRawCookies(child_id)) {
2388 VLOG(1) << "Denied unauthorized request for raw headers"; 2389 VLOG(1) << "Denied unauthorized request for raw headers";
2389 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; 2390 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS;
2390 } 2391 }
2391 2392
2392 return load_flags; 2393 return load_flags;
2393 } 2394 }
2394 2395
2395 } // namespace content 2396 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698