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

Unified Diff: base/process/process_info_mac.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/process/process_handle_win.cc ('k') | base/process/process_info_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_info_mac.cc
diff --git a/base/process/process_info_mac.cc b/base/process/process_info_mac.cc
index 7583266eba1312b002b0feff616273ccf6ce9a1a..27b9623d9e486f9990866d83883598543f1193dc 100644
--- a/base/process/process_info_mac.cc
+++ b/base/process/process_info_mac.cc
@@ -9,9 +9,10 @@
#include <sys/time.h>
#include <unistd.h>
+#include <memory>
+
#include "base/macros.h"
#include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
namespace base {
@@ -23,8 +24,8 @@ const Time CurrentProcessInfo::CreationTime() {
if (sysctl(mib, arraysize(mib), NULL, &len, NULL, 0) < 0)
return Time();
- scoped_ptr<struct kinfo_proc, base::FreeDeleter>
- proc(static_cast<struct kinfo_proc*>(malloc(len)));
+ std::unique_ptr<struct kinfo_proc, base::FreeDeleter> proc(
+ static_cast<struct kinfo_proc*>(malloc(len)));
if (sysctl(mib, arraysize(mib), proc.get(), &len, NULL, 0) < 0)
return Time();
return Time::FromTimeVal(proc->kp_proc.p_un.__p_starttime);
« no previous file with comments | « base/process/process_handle_win.cc ('k') | base/process/process_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698