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

Unified Diff: mojo/edk/system/core.cc

Issue 1350183002: EDK: More scoped_ptr -> std::unique_ptr conversions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: gah Created 5 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
« no previous file with comments | « mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc ('k') | mojo/edk/system/data_pipe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/core.cc
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
index e1a780b6bc2ee675d5b586f2ffc85940142a8a43..450897c7ee490e07fcdf999760ed9fe12f801c78 100644
--- a/mojo/edk/system/core.cc
+++ b/mojo/edk/system/core.cc
@@ -5,6 +5,7 @@
#include "mojo/edk/system/core.h"
#include <memory>
+#include <utility>
#include <vector>
#include "base/logging.h"
@@ -530,7 +531,7 @@ MojoResult Core::MapBuffer(MojoHandle buffer_handle,
if (!dispatcher)
return MOJO_RESULT_INVALID_ARGUMENT;
- scoped_ptr<embedder::PlatformSharedBufferMapping> mapping;
+ std::unique_ptr<embedder::PlatformSharedBufferMapping> mapping;
MojoResult result = dispatcher->MapBuffer(offset, num_bytes, flags, &mapping);
if (result != MOJO_RESULT_OK)
return result;
@@ -539,7 +540,7 @@ MojoResult Core::MapBuffer(MojoHandle buffer_handle,
void* address = mapping->GetBase();
{
MutexLocker locker(&mapping_table_mutex_);
- result = mapping_table_.AddMapping(mapping.Pass());
+ result = mapping_table_.AddMapping(std::move(mapping));
}
if (result != MOJO_RESULT_OK)
return result;
« no previous file with comments | « mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc ('k') | mojo/edk/system/data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698