Index: content/common/child_thread.cc |
diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc |
index bfde285d9a18f7e001d9fd22ed02060f9d89ea7c..f76c2a5649868789c1290fd1008c8bbecef2c468 100644 |
--- a/content/common/child_thread.cc |
+++ b/content/common/child_thread.cc |
@@ -41,6 +41,12 @@ void ChildThread::Init() { |
check_with_browser_before_shutdown_ = false; |
on_channel_error_called_ = false; |
message_loop_ = MessageLoop::current(); |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) { |
+ webkit_glue::SetUserAgent( |
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
+ switches::kUserAgent)); |
+ } |
+ |
channel_.reset(new IPC::SyncChannel(channel_name_, |
IPC::Channel::MODE_CLIENT, this, |
ChildProcess::current()->io_message_loop_proxy(), true, |