diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-22 23:27:27 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-22 23:27:27 +0000 |
commit | 4f45d458c94df1f27a8e1091387821a71f0b2a91 (patch) | |
tree | 6204e1f4103b824a8a1eb077290ade4303f10b6e /chrome_frame/bind_context_info.h | |
parent | 5efbfe01100407ead12b18daae9ccafe34eeedc5 (diff) | |
download | chromium_src-4f45d458c94df1f27a8e1091387821a71f0b2a91.zip chromium_src-4f45d458c94df1f27a8e1091387821a71f0b2a91.tar.gz chromium_src-4f45d458c94df1f27a8e1091387821a71f0b2a91.tar.bz2 |
If we switch into ChromeFrame as a result of a redirect then we need to navigate chrome to
the correct URL to ensure that scripts on the page see the correct URL. This functionality
regressed when the protocol sink patch landed.
Fix is to read the URL from the ProtData object which wraps the underlying protocol sink,
when our active document loads.
Removed stale code from the Chromeframe moniker patch which eventually needs to go.
Fixes bug http://code.google.com/p/chromium/issues/detail?can=2&q=71860
BUG=71860
TEST=As described in the bug.
Review URL: http://codereview.chromium.org/6469103
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75656 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/bind_context_info.h')
-rw-r--r-- | chrome_frame/bind_context_info.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/chrome_frame/bind_context_info.h b/chrome_frame/bind_context_info.h index d6c5d22..e9add10 100644 --- a/chrome_frame/bind_context_info.h +++ b/chrome_frame/bind_context_info.h @@ -65,21 +65,6 @@ class __declspec(uuid("00000000-0000-0000-0000-000000000000")) BindContextInfo return cache_; } - // Accept a const wchar_t* to ensure that we don't have a reference - // to someone else's buffer. - void set_url(const wchar_t* url) { - DCHECK(url); - if (url) { - url_ = url; - } else { - url_.clear(); - } - } - - const std::wstring& url() const { - return url_; - } - void set_prot_data(ProtData* data) { prot_data_ = data; } @@ -100,6 +85,10 @@ class __declspec(uuid("00000000-0000-0000-0000-000000000000")) BindContextInfo return protocol_.get(); } + // Returns the url being navigated to. We retrieve the url from the ProtData + // instance which wraps the underlying protocol sink. + std::wstring GetUrl(); + protected: STDMETHOD(GetCppObject)(void** me) { DCHECK(me); @@ -115,7 +104,6 @@ class __declspec(uuid("00000000-0000-0000-0000-000000000000")) BindContextInfo bool no_cache_; bool chrome_request_; bool is_switching_; - std::wstring url_; base::win::ScopedComPtr<IUnknown> ftm_; scoped_refptr<ProtData> prot_data_; ScopedComPtr<IInternetProtocol> protocol_; |