diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-18 22:18:39 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-18 22:18:39 +0000 |
commit | 908f687c4eed587612c2d179dcc58c54ee1d2cbf (patch) | |
tree | 29269728916ba07cfcd82f711ef9513fe7dc4910 /chrome_frame/bho.h | |
parent | 9bf414752683e232429b8d18022bfc43c80cc279 (diff) | |
download | chromium_src-908f687c4eed587612c2d179dcc58c54ee1d2cbf.zip chromium_src-908f687c4eed587612c2d179dcc58c54ee1d2cbf.tar.gz chromium_src-908f687c4eed587612c2d179dcc58c54ee1d2cbf.tar.bz2 |
Fix for referrer flakyness. There were two problems:
Grabbing the referrer header when the request is made and not in BeforeNavigate2.
The request headers aren't always available in BeforeNavigate2. Mshtml provides these
headers in IHttpNegotiate::BeginningTransaction, which is where we now grab them.
There was a race in chrome_frame_automation.cc where we use std::string to store the referrer url and then access that string from different threads. This was causing the referrer URL to be missing at some times and at other times be sent over to chrome as bad string (e.g. containing embedded nulls) and subsequently be deemed an invalid URL and dropped.
TEST=Fixes referrer header flakyness.
BUG=34812
Review URL: http://codereview.chromium.org/646013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/bho.h')
-rw-r--r-- | chrome_frame/bho.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome_frame/bho.h b/chrome_frame/bho.h index 9c058ff..c82f000 100644 --- a/chrome_frame/bho.h +++ b/chrome_frame/bho.h @@ -100,6 +100,13 @@ END_SINK_MAP() return url_; } + // Called from HttpNegotiatePatch::BeginningTransaction when a request is + // being issued. We check the url and headers and see if there is a referrer + // header that we need to cache. + void OnBeginningTransaction(IWebBrowser2* browser, const wchar_t* url, + const wchar_t* headers, + const wchar_t* additional_headers); + // Returns the Bho instance for the current thread. This is returned from // TLS. static Bho* GetCurrentThreadBhoInstance(); |