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

Unified Diff: base/process_util_win.cc

Issue 126279: Consistently use int64 for integers holding number of milliseconds. (Closed)
Patch Set: Created 11 years, 6 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_util_posix.cc ('k') | chrome/browser/history/expire_history_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_win.cc
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index 008cffa24fa0e058462fd3038de3bd96213ae43a..aea8cb96667638b0392ebe142a619e4efc3e3288 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -429,7 +429,7 @@ bool KillProcesses(const std::wstring& executable_name, int exit_code,
}
bool WaitForProcessesToExit(const std::wstring& executable_name,
- int wait_milliseconds,
+ int64 wait_milliseconds,
const ProcessFilter* filter) {
const ProcessEntry* entry;
bool result = true;
@@ -438,8 +438,7 @@ bool WaitForProcessesToExit(const std::wstring& executable_name,
NamedProcessIterator iter(executable_name, filter);
while (entry = iter.NextProcessEntry()) {
DWORD remaining_wait =
- std::max(0, wait_milliseconds -
- static_cast<int>(GetTickCount() - start_time));
+ std::max<int64>(0, wait_milliseconds - (GetTickCount() - start_time));
HANDLE process = OpenProcess(SYNCHRONIZE,
FALSE,
entry->th32ProcessID);
@@ -451,18 +450,18 @@ bool WaitForProcessesToExit(const std::wstring& executable_name,
return result;
}
-bool WaitForSingleProcess(ProcessHandle handle, int wait_milliseconds) {
+bool WaitForSingleProcess(ProcessHandle handle, int64 wait_milliseconds) {
bool retval = WaitForSingleObject(handle, wait_milliseconds) == WAIT_OBJECT_0;
return retval;
}
-bool CrashAwareSleep(ProcessHandle handle, int wait_milliseconds) {
+bool CrashAwareSleep(ProcessHandle handle, int64 wait_milliseconds) {
bool retval = WaitForSingleObject(handle, wait_milliseconds) == WAIT_TIMEOUT;
return retval;
}
bool CleanupProcesses(const std::wstring& executable_name,
- int wait_milliseconds,
+ int64 wait_milliseconds,
int exit_code,
const ProcessFilter* filter) {
bool exited_cleanly = WaitForProcessesToExit(executable_name,
« no previous file with comments | « base/process_util_posix.cc ('k') | chrome/browser/history/expire_history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698