| 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 // 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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 return; | 1223 return; |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 // Construct the request. | 1226 // Construct the request. |
| 1227 scoped_ptr<net::URLRequest> new_request = request_context->CreateRequest( | 1227 scoped_ptr<net::URLRequest> new_request = request_context->CreateRequest( |
| 1228 request_data.url, request_data.priority, NULL); | 1228 request_data.url, request_data.priority, NULL); |
| 1229 | 1229 |
| 1230 new_request->set_method(request_data.method); | 1230 new_request->set_method(request_data.method); |
| 1231 new_request->set_first_party_for_cookies( | 1231 new_request->set_first_party_for_cookies( |
| 1232 request_data.first_party_for_cookies); | 1232 request_data.first_party_for_cookies); |
| 1233 new_request->set_lofi_state( |
| 1234 static_cast<net::LoFiState>(request_data.lofi_state)); |
| 1233 | 1235 |
| 1234 // 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 |
| 1235 // redirects. | 1237 // redirects. |
| 1236 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME) { | 1238 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME) { |
| 1237 new_request->set_first_party_url_policy( | 1239 new_request->set_first_party_url_policy( |
| 1238 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT); | 1240 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT); |
| 1239 } | 1241 } |
| 1240 | 1242 |
| 1241 const Referrer referrer(request_data.referrer, request_data.referrer_policy); | 1243 const Referrer referrer(request_data.referrer, request_data.referrer_policy); |
| 1242 SetReferrerForRequest(new_request.get(), referrer); | 1244 SetReferrerForRequest(new_request.get(), referrer); |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2399 load_flags |= net::LOAD_PREFETCH; | 2401 load_flags |= net::LOAD_PREFETCH; |
| 2400 } | 2402 } |
| 2401 | 2403 |
| 2402 if (is_sync_load) | 2404 if (is_sync_load) |
| 2403 load_flags |= net::LOAD_IGNORE_LIMITS; | 2405 load_flags |= net::LOAD_IGNORE_LIMITS; |
| 2404 | 2406 |
| 2405 return load_flags; | 2407 return load_flags; |
| 2406 } | 2408 } |
| 2407 | 2409 |
| 2408 } // namespace content | 2410 } // namespace content |
| OLD | NEW |