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

Unified Diff: base/process/kill_win.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 3 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/numerics/safe_math_impl.h ('k') | base/strings/string_number_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/kill_win.cc
diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc
index 17bc22685ac94b39cdceb21b762530c08512db36..7bc94713cff3aa75c5c27e1c15183e83dac66864 100644
--- a/base/process/kill_win.cc
+++ b/base/process/kill_win.cc
@@ -187,7 +187,8 @@ bool WaitForExitCode(ProcessHandle handle, int* exit_code) {
bool WaitForExitCodeWithTimeout(ProcessHandle handle,
int* exit_code,
base::TimeDelta timeout) {
- if (::WaitForSingleObject(handle, timeout.InMilliseconds()) != WAIT_OBJECT_0)
+ if (::WaitForSingleObject(
+ handle, static_cast<DWORD>(timeout.InMilliseconds())) != WAIT_OBJECT_0)
return false;
DWORD temp_code; // Don't clobber out-parameters in case of failure.
if (!::GetExitCodeProcess(handle, &temp_code))
@@ -206,8 +207,9 @@ bool WaitForProcessesToExit(const FilePath::StringType& executable_name,
NamedProcessIterator iter(executable_name, filter);
for (const ProcessEntry* entry = iter.NextProcessEntry(); entry;
entry = iter.NextProcessEntry()) {
- DWORD remaining_wait = std::max<int64>(
- 0, wait.InMilliseconds() - (GetTickCount() - start_time));
+ DWORD remaining_wait = static_cast<DWORD>(std::max(
+ static_cast<int64>(0),
+ wait.InMilliseconds() - (GetTickCount() - start_time)));
HANDLE process = OpenProcess(SYNCHRONIZE,
FALSE,
entry->th32ProcessID);
« no previous file with comments | « base/numerics/safe_math_impl.h ('k') | base/strings/string_number_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698