Index: remoting/host/it2me/it2me_confirmation_dialog_win.cc |
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_win.cc b/remoting/host/it2me/it2me_confirmation_dialog_win.cc |
index 4e8453f91e571f866c2b1e68fb7e8ced9ad3c9bf..8075fa34f20bc564bba1aa16bf79a588867656af 100644 |
--- a/remoting/host/it2me/it2me_confirmation_dialog_win.cc |
+++ b/remoting/host/it2me/it2me_confirmation_dialog_win.cc |
@@ -5,6 +5,7 @@ |
#include <windows.h> |
#include <commctrl.h> |
+#include <cstdint> |
#include <memory> |
#include <string> |
@@ -17,6 +18,7 @@ |
#include "base/memory/ptr_util.h" |
#include "base/strings/string_util.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "base/time/time.h" |
#include "remoting/host/it2me/it2me_confirmation_dialog.h" |
#include "remoting/host/win/core_resource.h" |
@@ -25,7 +27,7 @@ namespace remoting { |
namespace { |
// Time to wait before closing the dialog and cancelling the connection. |
-const int kDialogTimeoutMs = 60 * 1000; |
+constexpr base::TimeDelta kDialogTimeout = base::TimeDelta::FromMinutes(1); |
const HRESULT kTimeoutErrorCode = E_ABORT; |
@@ -179,7 +181,7 @@ It2MeConfirmationDialogWin::TaskDialogCallbackProc(HWND hwnd, |
LPARAM l_param, |
LONG_PTR ref_data) { |
if (notification == TDN_TIMER) { |
- if (w_param >= kDialogTimeoutMs) { |
+ if (static_cast<int64_t>(w_param) >= kDialogTimeout.InMilliseconds()) { |
// Close the dialog window if we have reached the timeout. |
return kTimeoutErrorCode; |
} |