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

Unified Diff: content/browser/blob_storage/chrome_blob_storage_context.cc

Issue 2815913005: Switch to using scoped_ptr with UserData (Closed)
Patch Set: fixes Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/blob_storage/chrome_blob_storage_context.cc
diff --git a/content/browser/blob_storage/chrome_blob_storage_context.cc b/content/browser/blob_storage/chrome_blob_storage_context.cc
index 3192cd0d2d9c26ac16ee2420094e35893de00d61..f42a757b49aabd688305d971ff8af38508dfcc96 100644
--- a/content/browser/blob_storage/chrome_blob_storage_context.cc
+++ b/content/browser/blob_storage/chrome_blob_storage_context.cc
@@ -11,6 +11,7 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/guid.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"
@@ -80,7 +81,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
new ChromeBlobStorageContext();
context->SetUserData(
kBlobStorageContextKeyName,
- new UserDataAdapter<ChromeBlobStorageContext>(blob.get()));
+ base::MakeUnique<UserDataAdapter<ChromeBlobStorageContext>>(
+ blob.get()));
// Check first to avoid memory leak in unittests.
bool io_thread_valid = BrowserThread::IsMessageLoopValid(BrowserThread::IO);

Powered by Google App Engine
This is Rietveld 408576698