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

Unified Diff: base/win/win_util.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 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 | « base/win/scoped_comptr_unittest.cc ('k') | base/win/windows_version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/win_util.cc
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index 87bde159cd5ac0420d3043cd87797cacfaf3f133..b10d555406e92f344940f0f352a1efc7ccbbf30b 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -27,12 +27,13 @@
#include <winstring.h>
#include <wrl/wrappers/corewrappers.h>
+#include <memory>
+
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -347,7 +348,7 @@ bool GetUserSidString(std::wstring* user_sid) {
ScopedHandle token_scoped(token);
DWORD size = sizeof(TOKEN_USER) + SECURITY_MAX_SID_SIZE;
- scoped_ptr<BYTE[]> user_bytes(new BYTE[size]);
+ std::unique_ptr<BYTE[]> user_bytes(new BYTE[size]);
TOKEN_USER* user = reinterpret_cast<TOKEN_USER*>(user_bytes.get());
if (!::GetTokenInformation(token, TokenUser, user, size, &size))
@@ -573,7 +574,7 @@ bool DisplayVirtualKeyboard() {
// We then replace the %CommonProgramFiles% value with the actual common
// files path found in the process.
string16 common_program_files_path;
- scoped_ptr<wchar_t[]> common_program_files_wow6432;
+ std::unique_ptr<wchar_t[]> common_program_files_wow6432;
DWORD buffer_size =
GetEnvironmentVariable(L"CommonProgramW6432", NULL, 0);
if (buffer_size) {
« no previous file with comments | « base/win/scoped_comptr_unittest.cc ('k') | base/win/windows_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698