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

Unified Diff: components/user_prefs/tracked/device_id_win.cc

Issue 1908143002: Convert //components/user_prefs from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore the rightful glory of <windows.h> 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 | « no previous file | components/user_prefs/tracked/dictionary_hash_store_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_prefs/tracked/device_id_win.cc
diff --git a/components/user_prefs/tracked/device_id_win.cc b/components/user_prefs/tracked/device_id_win.cc
index 579d509dd17b397d590d9df2bc192e59ebdffacd..4f0c1db031efdbb0919ee1201affa8fb9d218bf6 100644
--- a/components/user_prefs/tracked/device_id_win.cc
+++ b/components/user_prefs/tracked/device_id_win.cc
@@ -7,9 +7,10 @@
#include <windows.h>
#include <sddl.h> // For ConvertSidToStringSidA.
+#include <memory>
+
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id) {
DCHECK(machine_id);
@@ -24,7 +25,7 @@ MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id) {
char sid_buffer[SECURITY_MAX_SID_SIZE];
SID* sid = reinterpret_cast<SID*>(sid_buffer);
DWORD domain_size = 128; // Will expand below if needed.
- scoped_ptr<wchar_t[]> domain_buffer(new wchar_t[domain_size]);
+ std::unique_ptr<wchar_t[]> domain_buffer(new wchar_t[domain_size]);
SID_NAME_USE sid_name_use;
// Although the fifth argument to |LookupAccountNameW()|,
« no previous file with comments | « no previous file | components/user_prefs/tracked/dictionary_hash_store_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698