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

Unified Diff: chrome/test/automation/automation_proxy.cc

Issue 5707006: Revert "Add named testing interface." (Closed)
Patch Set: Created 10 years 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 | « chrome/test/automation/automation_proxy.h ('k') | chrome/test/automation/automation_proxy_uitest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/automation_proxy.cc
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index cd5d9afb2105d75f746334c238c5b30c077b9493..4da271ba80e984736f44bff14f84d78df5b74992 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -107,8 +107,10 @@ AutomationProxy::AutomationProxy(int command_execution_timeout_ms,
// least it is legal... ;-)
DCHECK_GE(command_execution_timeout_ms, 0);
listener_thread_id_ = PlatformThread::CurrentId();
+ InitializeChannelID();
InitializeHandleTracker();
InitializeThread();
+ InitializeChannel();
}
AutomationProxy::~AutomationProxy() {
@@ -120,7 +122,7 @@ AutomationProxy::~AutomationProxy() {
tracker_.reset();
}
-std::string AutomationProxy::GenerateChannelID() {
+void AutomationProxy::InitializeChannelID() {
// The channel counter keeps us out of trouble if we create and destroy
// several AutomationProxies sequentially over the course of a test run.
// (Creating the channel sometimes failed before when running a lot of
@@ -131,7 +133,7 @@ std::string AutomationProxy::GenerateChannelID() {
std::ostringstream buf;
buf << "ChromeTestingInterface:" << base::GetCurrentProcId() <<
"." << ++channel_counter;
- return buf.str();
+ channel_id_ = buf.str();
}
void AutomationProxy::InitializeThread() {
@@ -144,8 +146,7 @@ void AutomationProxy::InitializeThread() {
thread_.swap(thread);
}
-void AutomationProxy::InitializeChannel(const std::string& channel_id,
- bool use_named_interface) {
+void AutomationProxy::InitializeChannel() {
DCHECK(shutdown_event_.get() != NULL);
// TODO(iyengar)
@@ -153,9 +154,8 @@ void AutomationProxy::InitializeChannel(const std::string& channel_id,
// provider, where we use the shutdown event provided by the chrome browser
// process.
channel_.reset(new IPC::SyncChannel(
- channel_id,
- use_named_interface ? IPC::Channel::MODE_NAMED_CLIENT
- : IPC::Channel::MODE_SERVER,
+ channel_id_,
+ IPC::Channel::MODE_SERVER,
this, // we are the listener
thread_->message_loop(),
true,
« no previous file with comments | « chrome/test/automation/automation_proxy.h ('k') | chrome/test/automation/automation_proxy_uitest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698