diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 20:42:33 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 20:42:33 +0000 |
commit | 723f2992cd897dc9c31e33994c49bd389bd800e1 (patch) | |
tree | 96383943a9e4ec925b6140085cff5f848715b4a8 /chrome_frame/utils.h | |
parent | 1ded8cdc42869e312e55e7f14b6017d545b282d2 (diff) | |
download | chromium_src-723f2992cd897dc9c31e33994c49bd389bd800e1.zip chromium_src-723f2992cd897dc9c31e33994c49bd389bd800e1.tar.gz chromium_src-723f2992cd897dc9c31e33994c49bd389bd800e1.tar.bz2 |
Limit the X-UA-Compatible HTTP header-based altering of the mime type performed by Chrome Frame to top-level requests only in IE.
BUG=having an iframe that requests a resource that includes the X-UA-Compatible header in the response will trigger CF taking over the page.
TEST=BUG doesn't happen anymore.
Review URL: http://codereview.chromium.org/465036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.h')
-rw-r--r-- | chrome_frame/utils.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h index 351fba1..a685691 100644 --- a/chrome_frame/utils.h +++ b/chrome_frame/utils.h @@ -211,6 +211,17 @@ bool IsValidUrlScheme(const std::wstring& url, bool is_privileged); // IWinInetHttpInfo pointer. std::string GetRawHttpHeaders(IWinInetHttpInfo* info); +// Can be used to determine whether a given request is being performed for +// a sub-frame or iframe in Internet Explorer. This can be called +// from various places, notably in request callbacks and the like. +// +// |service_provider| must not be NULL and should be a pointer to something +// that implements IServiceProvider (if it isn't this method returns false). +// +// Returns true if this method can determine with some certainty that the +// request did NOT originate from a top level frame, returns false otherwise. +bool IsSubFrameRequest(IUnknown* service_provider); + // See COM_INTERFACE_BLIND_DELEGATE below for details. template <class T> STDMETHODIMP CheckOutgoingInterface(void* obj, REFIID iid, void** ret, |