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

Unified Diff: webrtc/base/win32regkey.cc

Issue 1920043002: Replace scoped_ptr with unique_ptr in webrtc/base/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 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
« no previous file with comments | « webrtc/base/win32filesystem.cc ('k') | webrtc/base/windowpicker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/win32regkey.cc
diff --git a/webrtc/base/win32regkey.cc b/webrtc/base/win32regkey.cc
index c53386fffe4e8e9090f099e68f829964337f38b4..447086aff5fcfffcaf544ec513004490a48e1204 100644
--- a/webrtc/base/win32regkey.cc
+++ b/webrtc/base/win32regkey.cc
@@ -21,9 +21,10 @@
#include <shlwapi.h>
+#include <memory>
+
#include "webrtc/base/common.h"
#include "webrtc/base/logging.h"
-#include "webrtc/base/scoped_ptr.h"
namespace rtc {
@@ -146,7 +147,7 @@ HRESULT RegKey::GetValue(const wchar_t* full_key_name,
byte* buffer_raw = nullptr;
HRESULT hr = GetValueStaticHelper(full_key_name, value_name,
REG_BINARY, &buffer_raw, &byte_count);
- scoped_ptr<byte[]> buffer(buffer_raw);
+ std::unique_ptr<byte[]> buffer(buffer_raw);
if (SUCCEEDED(hr)) {
ASSERT(byte_count == sizeof(*value));
if (byte_count == sizeof(*value)) {
@@ -166,7 +167,7 @@ HRESULT RegKey::GetValue(const wchar_t* full_key_name,
byte* buffer_raw = nullptr;
HRESULT hr = GetValueStaticHelper(full_key_name, value_name,
REG_BINARY, &buffer_raw, &byte_count);
- scoped_ptr<byte[]> buffer(buffer_raw);
+ std::unique_ptr<byte[]> buffer(buffer_raw);
if (SUCCEEDED(hr)) {
ASSERT(byte_count == sizeof(*value));
if (byte_count == sizeof(*value)) {
@@ -193,7 +194,7 @@ HRESULT RegKey::GetValue(const wchar_t* full_key_name,
wchar_t* buffer_raw = nullptr;
HRESULT hr = RegKey::GetValue(full_key_name, value_name, &buffer_raw);
- scoped_ptr<wchar_t[]> buffer(buffer_raw);
+ std::unique_ptr<wchar_t[]> buffer(buffer_raw);
if (SUCCEEDED(hr)) {
value->assign(buffer.get());
}
« no previous file with comments | « webrtc/base/win32filesystem.cc ('k') | webrtc/base/windowpicker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698