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

Unified Diff: base/process/process_info_mac.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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_info_linux.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
deleted file mode 100644
index b7cfdceda0505bd9306b4f02d5d28df76cb48a5e..0000000000000000000000000000000000000000
--- a/base/process/process_info_mac.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/process/process_info.h"
-
-#include <sys/sysctl.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-
-namespace base {
-
-//static
-const Time CurrentProcessInfo::CreationTime() {
- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
- size_t len = 0;
- 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)));
- if (sysctl(mib, arraysize(mib), proc.get(), &len, NULL, 0) < 0)
- return Time();
- return Time::FromTimeVal(proc->kp_proc.p_un.__p_starttime);
-}
-
-} // namespace base
« no previous file with comments | « base/process/process_info_linux.cc ('k') | base/process/process_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698