summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index e7437ce..859b94b 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -39,6 +39,7 @@
#include "chrome/common/win_util.h"
#include "net/base/cookie_monster.h"
#include "net/base/net_util.h"
+#include "webkit/glue/webkit_glue.h"
#include "chromium_strings.h"
#include "generated_resources.h"
@@ -407,6 +408,11 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile,
if (parsed_command_line.HasSwitch(switches::kEnableFileCookies))
net::CookieMonster::EnableFileScheme();
+ if (parsed_command_line.HasSwitch(switches::kUserAgent)) {
+ webkit_glue::SetUserAgent(WideToUTF8(
+ parsed_command_line.GetSwitchValue(switches::kUserAgent)));
+ }
+
#ifndef NDEBUG
if (parsed_command_line.HasSwitch(switches::kApp)) {
NOTREACHED();