summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index 7a49f18..94d30b8 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -144,10 +144,13 @@ class ChromeFrameAutomationProxyImpl::CFMsgDispatcher
};
ChromeFrameAutomationProxyImpl::ChromeFrameAutomationProxyImpl(
- AutomationProxyCacheEntry* entry, int launch_timeout)
+ AutomationProxyCacheEntry* entry,
+ std::string channel_id, int launch_timeout)
: AutomationProxy(launch_timeout, false), proxy_entry_(entry) {
TRACE_EVENT_BEGIN("chromeframe.automationproxy", this, "");
+ InitializeChannel(channel_id, false);
+
sync_ = new CFMsgDispatcher();
message_filter_ = new TabProxyNotificationMessageFilter(tracker_.get());
@@ -271,8 +274,10 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params,
// destruction notification.
// At same time we must destroy/stop the thread from another thread.
+ std::string channel_id = AutomationProxy::GenerateChannelID();
ChromeFrameAutomationProxyImpl* proxy =
- new ChromeFrameAutomationProxyImpl(this, params->launch_timeout());
+ new ChromeFrameAutomationProxyImpl(this, channel_id,
+ params->launch_timeout());
// Ensure that the automation proxy actually respects our choice on whether
// or not to check the version.
@@ -282,7 +287,7 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params,
scoped_ptr<CommandLine> command_line(
chrome_launcher::CreateLaunchCommandLine());
command_line->AppendSwitchASCII(switches::kAutomationClientChannelID,
- proxy->channel_id());
+ channel_id);
// Run Chrome in Chrome Frame mode. In practice, this modifies the paths
// and registry keys that Chrome looks in via the BrowserDistribution