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

Unified Diff: content/shell/common/shell_content_client.cc

Issue 319083003: Use the same fake User-Agent string as GetContentShell()->GetUserAgent() for URLRequestContext in c… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « content/shell/common/shell_content_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/common/shell_content_client.cc
diff --git a/content/shell/common/shell_content_client.cc b/content/shell/common/shell_content_client.cc
index f3bfc520669d90cc3667b4926df04f65d27aae64..3d1891df9e1fead50cc2a832e23377edbfff445a 100644
--- a/content/shell/common/shell_content_client.cc
+++ b/content/shell/common/shell_content_client.cc
@@ -18,10 +18,7 @@
namespace content {
-ShellContentClient::~ShellContentClient() {
-}
-
-std::string ShellContentClient::GetUserAgent() const {
+std::string GetShellUserAgent() {
std::string product = "Chrome/" CONTENT_SHELL_VERSION;
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUseMobileUserAgent))
@@ -29,6 +26,13 @@ std::string ShellContentClient::GetUserAgent() const {
return BuildUserAgentFromProduct(product);
}
+ShellContentClient::~ShellContentClient() {
+}
+
+std::string ShellContentClient::GetUserAgent() const {
+ return GetShellUserAgent();
+}
+
base::string16 ShellContentClient::GetLocalizedString(int message_id) const {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
switch (message_id) {
« no previous file with comments | « content/shell/common/shell_content_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698