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

Unified Diff: base/process/process_posix.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 5 years 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_metrics_win.cc ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_posix.cc
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 7b2eed784deea54570550663ffd49c872376bdfe..ade82e5ce663be75a4bd376f060d8ad8354fc4b1 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -5,6 +5,7 @@
#include "base/process/process.h"
#include <errno.h>
+#include <stdint.h>
#include <sys/resource.h>
#include <sys/wait.h>
@@ -13,6 +14,7 @@
#include "base/posix/eintr_wrapper.h"
#include "base/process/kill.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "build/build_config.h"
#if defined(OS_MACOSX)
#include <sys/event.h>
@@ -54,9 +56,9 @@ bool WaitpidWithTimeout(base::ProcessHandle handle,
}
pid_t ret_pid = HANDLE_EINTR(waitpid(handle, status, WNOHANG));
- static const int64 kMaxSleepInMicroseconds = 1 << 18; // ~256 milliseconds.
- int64 max_sleep_time_usecs = 1 << 10; // ~1 milliseconds.
- int64 double_sleep_time = 0;
+ static const int64_t kMaxSleepInMicroseconds = 1 << 18; // ~256 milliseconds.
+ int64_t max_sleep_time_usecs = 1 << 10; // ~1 milliseconds.
+ int64_t double_sleep_time = 0;
// If the process hasn't exited yet, then sleep and try again.
base::TimeTicks wakeup_time = base::TimeTicks::Now() + wait;
@@ -65,7 +67,7 @@ bool WaitpidWithTimeout(base::ProcessHandle handle,
if (now > wakeup_time)
break;
// Guaranteed to be non-negative!
- int64 sleep_time_usecs = (wakeup_time - now).InMicroseconds();
+ int64_t sleep_time_usecs = (wakeup_time - now).InMicroseconds();
// Sleep for a bit while we wait for the process to finish.
if (sleep_time_usecs > max_sleep_time_usecs)
sleep_time_usecs = max_sleep_time_usecs;
« no previous file with comments | « base/process/process_metrics_win.cc ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698