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

Side by Side Diff: base/process/process_info_linux.cc

Issue 1543293004: Switch to standard integer types in base/process/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ssize_t Created 4 years, 12 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
« no previous file with comments | « base/process/process_info.h ('k') | base/process/process_info_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process/process_info.h" 5 #include "base/process/process_info.h"
6 6
7 #include "base/basictypes.h" 7 #include <stdint.h>
8
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/process/internal_linux.h" 10 #include "base/process/internal_linux.h"
10 #include "base/process/process_handle.h" 11 #include "base/process/process_handle.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 13
13 namespace base { 14 namespace base {
14 15
15 // static 16 // static
16 const Time CurrentProcessInfo::CreationTime() { 17 const Time CurrentProcessInfo::CreationTime() {
17 ProcessHandle pid = GetCurrentProcessHandle(); 18 ProcessHandle pid = GetCurrentProcessHandle();
18 int64 start_ticks = 19 int64_t start_ticks =
19 internal::ReadProcStatsAndGetFieldAsInt64(pid, internal::VM_STARTTIME); 20 internal::ReadProcStatsAndGetFieldAsInt64(pid, internal::VM_STARTTIME);
20 DCHECK(start_ticks); 21 DCHECK(start_ticks);
21 TimeDelta start_offset = internal::ClockTicksToTimeDelta(start_ticks); 22 TimeDelta start_offset = internal::ClockTicksToTimeDelta(start_ticks);
22 Time boot_time = internal::GetBootTime(); 23 Time boot_time = internal::GetBootTime();
23 DCHECK(!boot_time.is_null()); 24 DCHECK(!boot_time.is_null());
24 return Time(boot_time + start_offset); 25 return Time(boot_time + start_offset);
25 } 26 }
26 27
27 } // namespace base 28 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process_info.h ('k') | base/process/process_info_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698