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

Side by Side Diff: base/process_info_win.cc

Issue 19519008: Move the remaning base/process* files into base/process/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/process_info_mac.cc ('k') | base/process_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/process_info.h"
6
7 #include <windows.h>
8
9 #include "base/basictypes.h"
10 #include "base/time/time.h"
11
12 namespace {
13
14 using base::Time;
15
16 // Returns the process creation time, or NULL if an error occurred.
17 Time* ProcessCreationTimeInternal() {
18 FILETIME creation_time = {};
19 FILETIME ignore = {};
20 if (::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore,
21 &ignore, &ignore) == false)
22 return NULL;
23
24 return new Time(Time::FromFileTime(creation_time));
25 }
26
27 } // namespace
28
29 namespace base {
30
31 //static
32 const Time* CurrentProcessInfo::CreationTime() {
33 static Time* process_creation_time = ProcessCreationTimeInternal();
34 return process_creation_time;
35 }
36
37 } // namespace base
OLDNEW
« no previous file with comments | « base/process_info_mac.cc ('k') | base/process_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698