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

Unified Diff: chrome/browser/chrome_process_finder_win.cc

Issue 981223004: Add test for ProcessSingleton hung rendezvous case. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix speling[sic]. Created 5 years, 9 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
Index: chrome/browser/chrome_process_finder_win.cc
diff --git a/chrome/browser/chrome_process_finder_win.cc b/chrome/browser/chrome_process_finder_win.cc
index 0fe88448bf3ee569a5c537c083d398d2e500d7d5..506d65ec3d0400019e78134dba2b031b717e612d 100644
--- a/chrome/browser/chrome_process_finder_win.cc
+++ b/chrome/browser/chrome_process_finder_win.cc
@@ -28,7 +28,9 @@
namespace {
-const int kTimeoutInSeconds = 20;
+const int kDefaultTimeoutInSeconds = 20;
+
+int timeout_in_seconds = kDefaultTimeoutInSeconds;
gab 2015/03/11 13:20:39 nit: |g_timeout_in_seconds| (g_ prefix for globals
Sigurður Ásgeirsson 2015/03/11 14:32:36 Done.
// The following is copied from net/base/escape.cc. We don't want to depend on
// net here because this gets compiled into chrome.exe to facilitate
@@ -146,7 +148,7 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
NULL,
reinterpret_cast<LPARAM>(&cds),
SMTO_ABORTIFHUNG,
- kTimeoutInSeconds * 1000,
+ timeout_in_seconds * 1000,
&result)) {
return result ? NOTIFY_SUCCESS : NOTIFY_FAILED;
}
@@ -159,4 +161,10 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
return NOTIFY_WINDOW_HUNG;
}
+int SetNotificationTimeoutInSecondsForTesting(int new_timeout) {
+ int old_timeout = timeout_in_seconds;
+ timeout_in_seconds = new_timeout;
+ return old_timeout;
gab 2015/03/11 13:20:39 <investigate>
Sigurður Ásgeirsson 2015/03/11 14:32:36 ???
gab 2015/03/11 15:19:42 Oops that was a note to self to figure out why we
+}
+
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698