diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 22:28:54 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 22:28:54 +0000 |
commit | 6f681a41c70030593dc14640920d8447ef9389f2 (patch) | |
tree | da9b0bb6552dc93ba1c1ab59a47588e5bb9196e9 /webkit/tools/test_shell | |
parent | b06878082f5dd7a9e289c0363e2aa9331a154fdb (diff) | |
download | chromium_src-6f681a41c70030593dc14640920d8447ef9389f2.zip chromium_src-6f681a41c70030593dc14640920d8447ef9389f2.tar.gz chromium_src-6f681a41c70030593dc14640920d8447ef9389f2.tar.bz2 |
Add support for UA spoofing, and spoof Safari's UA string when loading URLs
from *.mail.live.com (to fix hotmail).
BUG=4111
R=wtc
Review URL: http://codereview.chromium.org/19025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8764 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r-- | webkit/tools/test_shell/test_shell_request_context.cc | 6 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_request_context.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/webkit/tools/test_shell/test_shell_request_context.cc b/webkit/tools/test_shell/test_shell_request_context.cc index 8f8202d..2597f77 100644 --- a/webkit/tools/test_shell/test_shell_request_context.cc +++ b/webkit/tools/test_shell/test_shell_request_context.cc @@ -25,8 +25,6 @@ void TestShellRequestContext::Init( bool no_proxy) { cookie_store_ = new net::CookieMonster(); - user_agent_ = webkit_glue::GetUserAgent(); - // hard-code A-L and A-C for test shells accept_language_ = "en-us,en"; accept_charset_ = "iso-8859-1,*,utf-8"; @@ -51,3 +49,7 @@ TestShellRequestContext::~TestShellRequestContext() { delete proxy_service_; } +const std::string& TestShellRequestContext::GetUserAgent( + const GURL& url) const { + return webkit_glue::GetUserAgent(url); +} diff --git a/webkit/tools/test_shell/test_shell_request_context.h b/webkit/tools/test_shell/test_shell_request_context.h index 45a899d..daf3ab2 100644 --- a/webkit/tools/test_shell/test_shell_request_context.h +++ b/webkit/tools/test_shell/test_shell_request_context.h @@ -22,6 +22,8 @@ class TestShellRequestContext : public URLRequestContext { ~TestShellRequestContext(); + virtual const std::string& GetUserAgent(const GURL& url) const; + private: void Init(const std::wstring& cache_path, net::HttpCache::Mode cache_mode, bool no_proxy); |