| 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 <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME) { | 1444 if (request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME) { |
| 1445 new_request->set_first_party_url_policy( | 1445 new_request->set_first_party_url_policy( |
| 1446 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT); | 1446 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT); |
| 1447 } | 1447 } |
| 1448 | 1448 |
| 1449 const Referrer referrer(request_data.referrer, request_data.referrer_policy); | 1449 const Referrer referrer(request_data.referrer, request_data.referrer_policy); |
| 1450 SetReferrerForRequest(new_request.get(), referrer); | 1450 SetReferrerForRequest(new_request.get(), referrer); |
| 1451 | 1451 |
| 1452 new_request->SetExtraRequestHeaders(headers); | 1452 new_request->SetExtraRequestHeaders(headers); |
| 1453 | 1453 |
| 1454 new_request->set_default_user_agent(request_data.default_user_agent); |
| 1455 |
| 1454 storage::BlobStorageContext* blob_context = | 1456 storage::BlobStorageContext* blob_context = |
| 1455 GetBlobStorageContext(filter_->blob_storage_context()); | 1457 GetBlobStorageContext(filter_->blob_storage_context()); |
| 1456 // Resolve elements from request_body and prepare upload data. | 1458 // Resolve elements from request_body and prepare upload data. |
| 1457 if (request_data.request_body.get()) { | 1459 if (request_data.request_body.get()) { |
| 1458 // |blob_context| could be null when the request is from the plugins because | 1460 // |blob_context| could be null when the request is from the plugins because |
| 1459 // ResourceMessageFilters created in PluginProcessHost don't have the blob | 1461 // ResourceMessageFilters created in PluginProcessHost don't have the blob |
| 1460 // context. | 1462 // context. |
| 1461 if (blob_context) { | 1463 if (blob_context) { |
| 1462 // Attaches the BlobDataHandles to request_body not to free the blobs and | 1464 // Attaches the BlobDataHandles to request_body not to free the blobs and |
| 1463 // any attached shareable files until upload completion. These data will | 1465 // any attached shareable files until upload completion. These data will |
| (...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2719 << iter->filesystem_url().spec(); | 2721 << iter->filesystem_url().spec(); |
| 2720 return false; | 2722 return false; |
| 2721 } | 2723 } |
| 2722 } | 2724 } |
| 2723 } | 2725 } |
| 2724 } | 2726 } |
| 2725 return true; | 2727 return true; |
| 2726 } | 2728 } |
| 2727 | 2729 |
| 2728 } // namespace content | 2730 } // namespace content |
| OLD | NEW |