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

Unified Diff: webkit/glue/webkit_glue.cc

Issue 193074: Remove the hotmail UA spoofing hack.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webkit_glue.cc
===================================================================
--- webkit/glue/webkit_glue.cc (revision 25839)
+++ webkit/glue/webkit_glue.cc (working copy)
@@ -294,7 +294,6 @@
}
std::string user_agent;
- std::string mimic_safari_user_agent;
bool user_agent_requested;
bool user_agent_is_overridden;
};
@@ -354,7 +353,7 @@
return os_cpu;
}
-void BuildUserAgent(bool mimic_safari, std::string* result) {
+void BuildUserAgent(std::string* result) {
const char kUserAgentPlatform[] =
#if defined(OS_WIN)
"Windows";
@@ -376,16 +375,15 @@
// maximally compatible with Safari, we hope!!
std::string product;
- if (!mimic_safari) {
- scoped_ptr<FileVersionInfo> version_info(
- FileVersionInfo::CreateFileVersionInfoForCurrentModule());
- if (version_info.get())
- product = "Chrome/" + WideToASCII(version_info->product_version());
+ scoped_ptr<FileVersionInfo> version_info(
+ FileVersionInfo::CreateFileVersionInfoForCurrentModule());
+ if (version_info.get()) {
+ product = "Chrome/" + WideToASCII(version_info->product_version());
+ } else {
+ DLOG(WARNING) << "Unknown product version";
+ product = "Chrome/0.0.0.0";
}
- if (product.empty())
- product = "Version/3.2.1";
-
// Derived from Safari's UA string.
StringAppendF(
result,
@@ -423,14 +421,6 @@
if (g_user_agent->user_agent.empty())
SetUserAgentToDefault();
g_user_agent->user_agent_requested = true;
- if (!g_user_agent->user_agent_is_overridden) {
- // For hotmail, we need to spoof as Safari (bug 4111).
- if (MatchPattern(url.host(), "*.mail.live.com")) {
- if (g_user_agent->mimic_safari_user_agent.empty())
- BuildUserAgent(true, &g_user_agent->mimic_safari_user_agent);
- return g_user_agent->mimic_safari_user_agent;
- }
- }
return g_user_agent->user_agent;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698