| 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 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 5 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 if (element.type() != ResourceRequestBodyImpl::Element::TYPE_BLOB) | 211 if (element.type() != ResourceRequestBodyImpl::Element::TYPE_BLOB) |
| 212 continue; | 212 continue; |
| 213 std::unique_ptr<storage::BlobDataHandle> handle = | 213 std::unique_ptr<storage::BlobDataHandle> handle = |
| 214 blob_context->GetBlobDataFromUUID(element.blob_uuid()); | 214 blob_context->GetBlobDataFromUUID(element.blob_uuid()); |
| 215 DCHECK(handle); | 215 DCHECK(handle); |
| 216 if (!handle) | 216 if (!handle) |
| 217 continue; | 217 continue; |
| 218 // Ensure the blob and any attached shareable files survive until | 218 // Ensure the blob and any attached shareable files survive until |
| 219 // upload completion. The |body| takes ownership of |handle|. | 219 // upload completion. The |body| takes ownership of |handle|. |
| 220 const void* key = handle.get(); | 220 const void* key = handle.get(); |
| 221 body->SetUserData(key, handle.release()); | 221 body->SetUserData(key, std::move(handle)); |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace content | 225 } // namespace content |
| OLD | NEW |