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

Unified Diff: content/child/child_thread.cc

Issue 343543002: Increase the child process connection timeout for browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.cc
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 55cef8f520205650237181d6000756f99ceb3dfa..58db014ca881e85d04500e525d9df3b2ff13181f 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -19,6 +19,7 @@
#include "base/message_loop/timer_slack.h"
#include "base/process/kill.h"
#include "base/process/process_handle.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
@@ -289,11 +290,21 @@ void ChildThread::Init() {
channel_->AddFilter(new SuicideOnChannelErrorFilter());
#endif
+ int connection_timeout = kConnectionTimeoutS;
+ std::string connection_override =
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kIPCConnectionTimeout);
+ if (!connection_override.empty()) {
+ int temp;
+ if (base::StringToInt(connection_override, &temp))
+ connection_timeout = temp;
+ }
+
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ChildThread::EnsureConnected,
channel_connected_factory_.GetWeakPtr()),
- base::TimeDelta::FromSeconds(kConnectionTimeoutS));
+ base::TimeDelta::FromSeconds(connection_timeout));
#if defined(OS_ANDROID)
{
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698