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

Unified Diff: mojo/dart/embedder/builtin_natives.cc

Issue 2069663002: Some scoped_ptr -> std::unique_ptr conversion, especially under //mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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: mojo/dart/embedder/builtin_natives.cc
diff --git a/mojo/dart/embedder/builtin_natives.cc b/mojo/dart/embedder/builtin_natives.cc
index 3121c5db821706eb117cfced431c7287c9e480d8..5a1f66e3e98024d138b5dfcdb376177450a698ba 100644
--- a/mojo/dart/embedder/builtin_natives.cc
+++ b/mojo/dart/embedder/builtin_natives.cc
@@ -6,12 +6,13 @@
#include <stdlib.h>
#include <string.h>
+#include <memory>
+
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/rand_util.h"
#include "dart/runtime/include/dart_api.h"
#include "mojo/dart/embedder/builtin.h"
@@ -121,7 +122,7 @@ void Crypto_GetRandomBytes(Dart_NativeArguments args) {
Dart_ThrowException(error);
}
intptr_t count = static_cast<intptr_t>(count64);
- scoped_ptr<uint8_t[]> buffer(new uint8_t[count]);
+ std::unique_ptr<uint8_t[]> buffer(new uint8_t[count]);
base::RandBytes(reinterpret_cast<void*>(buffer.get()), count);
« no previous file with comments | « mojo/converters/ozone_drm_gpu/ozone_drm_gpu_type_converters.h ('k') | mojo/data_pipe_utils/data_pipe_file_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698