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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 8002003: Revert "Remove webkit_glue::BuildUserAgent(), change the contract in webkit_glue" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months 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 | « no previous file | chrome/common/chrome_content_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698