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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 9623027: Move --user-agent overriding logic from chrome into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 | « chrome/common/chrome_content_client.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index 0262099ab793e484971f8389f47bea57ce6559d1..b713f82e9cc4aead3c30f4b25b16367c85d93f9d 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -367,18 +367,11 @@ bool ChromeContentClient::CanHandleWhileSwappedOut(
return false;
}
-std::string ChromeContentClient::GetUserAgent(bool* overriding) const {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserAgent)) {
- *overriding = true;
- return CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kUserAgent);
- } else {
- *overriding = false;
- chrome::VersionInfo version_info;
- std::string product("Chrome/");
- product += version_info.is_valid() ? version_info.Version() : "0.0.0.0";
- return webkit_glue::BuildUserAgentFromProduct(product);
- }
+std::string ChromeContentClient::GetUserAgent() const {
+ chrome::VersionInfo version_info;
+ std::string product("Chrome/");
+ product += version_info.is_valid() ? version_info.Version() : "0.0.0.0";
+ return webkit_glue::BuildUserAgentFromProduct(product);
}
string16 ChromeContentClient::GetLocalizedString(int message_id) const {
« no previous file with comments | « chrome/common/chrome_content_client.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698