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

Unified Diff: mojo/edk/embedder/platform_shared_buffer.h

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 | « no previous file | mojo/edk/embedder/simple_platform_shared_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/platform_shared_buffer.h
diff --git a/mojo/edk/embedder/platform_shared_buffer.h b/mojo/edk/embedder/platform_shared_buffer.h
index 61b372916aeca6f452762884e97269f619fd00e2..014fad772120a4a925dd1422cdd2e807fe89a2c9 100644
--- a/mojo/edk/embedder/platform_shared_buffer.h
+++ b/mojo/edk/embedder/platform_shared_buffer.h
@@ -7,8 +7,9 @@
#include <stddef.h>
+#include <memory>
+
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/edk/system/system_impl_export.h"
#include "mojo/public/cpp/system/macros.h"
@@ -42,16 +43,17 @@ class MOJO_SYSTEM_IMPL_EXPORT PlatformSharedBuffer
// Maps (some) of the shared buffer into memory; [|offset|, |offset + length|]
// must be contained in [0, |num_bytes|], and |length| must be at least 1.
// Returns null on failure.
- virtual scoped_ptr<PlatformSharedBufferMapping> Map(size_t offset,
- size_t length) = 0;
+ virtual std::unique_ptr<PlatformSharedBufferMapping> Map(size_t offset,
+ size_t length) = 0;
// Checks if |offset| and |length| are valid arguments.
virtual bool IsValidMap(size_t offset, size_t length) = 0;
// Like |Map()|, but doesn't check its arguments (which should have been
// preflighted using |IsValidMap()|).
- virtual scoped_ptr<PlatformSharedBufferMapping> MapNoCheck(size_t offset,
- size_t length) = 0;
+ virtual std::unique_ptr<PlatformSharedBufferMapping> MapNoCheck(
+ size_t offset,
+ size_t length) = 0;
// Duplicates the underlying platform handle and passes it to the caller.
// TODO(vtl): On POSIX, we'll need two FDs to support sharing read-only.
« no previous file with comments | « no previous file | mojo/edk/embedder/simple_platform_shared_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698