Index: chrome/browser/ui/browser_init.cc |
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc |
index 850d389e96e7ff759ff4da8a3dad3d591d3a425c..62e3b795dfbb7d76d653289baa1a57bc7381423c 100644 |
--- a/chrome/browser/ui/browser_init.cc |
+++ b/chrome/browser/ui/browser_init.cc |
@@ -78,6 +78,7 @@ |
#include "net/base/net_util.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/resource/resource_bundle.h" |
+#include "webkit/glue/webkit_glue.h" |
#if defined(OS_MACOSX) |
#include "base/mac/mac_util.h" |
@@ -689,6 +690,11 @@ bool BrowserInit::LaunchWithProfile::Launch( |
} |
} |
+ if (command_line_.HasSwitch(switches::kUserAgent)) { |
+ webkit_glue::SetUserAgent(command_line_.GetSwitchValueASCII( |
+ switches::kUserAgent)); |
+ } |
+ |
// Open the required browser windows and tabs. First, see if |
// we're being run as an application window. If so, the user |
// opened an app shortcut. Don't restore tabs or open initial |