| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 378 } | 378 } | 
| 379 | 379 | 
| 380 void AttachRequestBodyBlobDataHandles( | 380 void AttachRequestBodyBlobDataHandles( | 
| 381     ResourceRequestBody* body, | 381     ResourceRequestBody* body, | 
| 382     storage::BlobStorageContext* blob_context) { | 382     storage::BlobStorageContext* blob_context) { | 
| 383   DCHECK(blob_context); | 383   DCHECK(blob_context); | 
| 384   for (size_t i = 0; i < body->elements()->size(); ++i) { | 384   for (size_t i = 0; i < body->elements()->size(); ++i) { | 
| 385     const ResourceRequestBody::Element& element = (*body->elements())[i]; | 385     const ResourceRequestBody::Element& element = (*body->elements())[i]; | 
| 386     if (element.type() != ResourceRequestBody::Element::TYPE_BLOB) | 386     if (element.type() != ResourceRequestBody::Element::TYPE_BLOB) | 
| 387       continue; | 387       continue; | 
| 388     scoped_ptr<storage::BlobDataHandle> handle = | 388     scoped_ptr<storage::BlobDataSnapshotHandle> handle = | 
| 389         blob_context->GetBlobDataFromUUID(element.blob_uuid()); | 389         blob_context->GetBlobDataFromUUID(element.blob_uuid()); | 
| 390     DCHECK(handle); | 390     DCHECK(handle); | 
| 391     if (!handle) | 391     if (!handle) | 
| 392       continue; | 392       continue; | 
| 393     // Ensure the blob and any attached shareable files survive until | 393     // Ensure the blob and any attached shareable files survive until | 
| 394     // upload completion. The |body| takes ownership of |handle|. | 394     // upload completion. The |body| takes ownership of |handle|. | 
| 395     const void* key = handle.get(); | 395     const void* key = handle.get(); | 
| 396     body->SetUserData(key, handle.release()); | 396     body->SetUserData(key, handle.release()); | 
| 397   } | 397   } | 
| 398 } | 398 } | 
| (...skipping 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2362 | 2362 | 
| 2363   // Add a flag to selectively bypass the data reduction proxy if the resource | 2363   // Add a flag to selectively bypass the data reduction proxy if the resource | 
| 2364   // type is not an image. | 2364   // type is not an image. | 
| 2365   if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 2365   if (request_data.resource_type != RESOURCE_TYPE_IMAGE) | 
| 2366     load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 2366     load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 
| 2367 | 2367 | 
| 2368   return load_flags; | 2368   return load_flags; | 
| 2369 } | 2369 } | 
| 2370 | 2370 | 
| 2371 }  // namespace content | 2371 }  // namespace content | 
| OLD | NEW | 
|---|