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

Side by Side Diff: content/browser/blob_storage/chrome_blob_storage_context.cc

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 years, 7 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 #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
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
OLDNEW
« no previous file with comments | « content/browser/android/java/gin_java_bridge_message_filter.cc ('k') | content/browser/browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698