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

Unified Diff: content/browser/plugin_private_storage_helper.cc

Issue 2256173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace a WrapUnique() nested inside a MakeUnique() Created 4 years, 3 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/plugin_private_storage_helper.cc
diff --git a/content/browser/plugin_private_storage_helper.cc b/content/browser/plugin_private_storage_helper.cc
index 3d241ea36b5e0eb0ab8fe2b6bc47c7ebb6c021c7..e58033ccfe8a8ccf150e231dbe583bbe026370d8 100644
--- a/content/browser/plugin_private_storage_helper.cc
+++ b/content/browser/plugin_private_storage_helper.cc
@@ -142,8 +142,8 @@ void PluginPrivateDataByOriginChecker::OnFileSystemOpened(
std::string root = storage::GetIsolatedFileSystemRootURIString(
origin_, fsid_, ppapi::kPluginPrivateRootName);
std::unique_ptr<storage::FileSystemOperationContext> operation_context =
- base::WrapUnique(
- new storage::FileSystemOperationContext(filesystem_context_));
+ base::MakeUnique<storage::FileSystemOperationContext>(
+ filesystem_context_);
file_util->ReadDirectory(
std::move(operation_context), filesystem_context_->CrackURL(GURL(root)),
base::Bind(&PluginPrivateDataByOriginChecker::OnDirectoryRead,
@@ -177,8 +177,8 @@ void PluginPrivateDataByOriginChecker::OnDirectoryRead(
DCHECK(!file.is_directory); // Nested directories not implemented.
std::unique_ptr<storage::FileSystemOperationContext> operation_context =
- base::WrapUnique(
- new storage::FileSystemOperationContext(filesystem_context_));
+ base::MakeUnique<storage::FileSystemOperationContext>(
+ filesystem_context_);
storage::FileSystemURL file_url = filesystem_context_->CrackURL(
GURL(root + StringTypeToString(file.name)));
IncrementTaskCount();

Powered by Google App Engine
This is Rietveld 408576698