diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-16 19:38:52 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-16 19:38:52 +0000 |
commit | 6a8515e44d88fcd704dc871d7c07314ceb3323bb (patch) | |
tree | f3c82ed61a3e191313975b6f1afe515709e0cba0 /chrome_frame/http_negotiate.h | |
parent | 457592496d7b0ad20c7f05ac3e1141073e134e6f (diff) | |
download | chromium_src-6a8515e44d88fcd704dc871d7c07314ceb3323bb.zip chromium_src-6a8515e44d88fcd704dc871d7c07314ceb3323bb.tar.gz chromium_src-6a8515e44d88fcd704dc871d7c07314ceb3323bb.tar.bz2 |
Add the ChromeFrame UA in the post platform section in the IE user agent string. To achieve
this we need to add the desired value in the registry under the
Internet Settings\User Agent\Post Platform key. We add this under the per user or per machine
section in the registry depending on whether ChromeFrame is being installed in per user or
per machine mode. This fixes the bug where certain top level requests in IE would not have
the chrome frame UA appended to the IE UA.
Removed the BeginningTransaction vtable patch code, which only existed to add chrome frame to
the UA in outgoing requests.
The limitation with registering the chrome frame UA in the registry is that it will be sent
out even in the ChromeFrame BHO is disabled.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=45087
BUG=45087
TESt=Covered by new chrome frame test.
Review URL: http://codereview.chromium.org/5831002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69442 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/http_negotiate.h')
-rw-r--r-- | chrome_frame/http_negotiate.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/chrome_frame/http_negotiate.h b/chrome_frame/http_negotiate.h index eb17c7f..151ad23 100644 --- a/chrome_frame/http_negotiate.h +++ b/chrome_frame/http_negotiate.h @@ -12,53 +12,6 @@ #include "base/basictypes.h" #include "base/scoped_comptr_win.h" -// Typedefs for IHttpNegotiate methods. -typedef HRESULT (STDMETHODCALLTYPE* IHttpNegotiate_BeginningTransaction_Fn)( - IHttpNegotiate* me, LPCWSTR url, LPCWSTR headers, DWORD reserved, - LPWSTR* additional_headers); -typedef HRESULT (STDMETHODCALLTYPE* IHttpNegotiate_OnResponse_Fn)( - IHttpNegotiate* me, DWORD response_code, LPCWSTR response_header, - LPCWSTR request_header, LPWSTR* additional_request_headers); - -// Typedefs for IBindStatusCallback methods. -typedef HRESULT (STDMETHODCALLTYPE* IBindStatusCallback_StartBinding_Fn)( - IBindStatusCallback* me, DWORD reserved, IBinding *binding); - -// Typedefs for IInternetProtocolSink methods. -typedef HRESULT (STDMETHODCALLTYPE* IInternetProtocolSink_ReportProgress_Fn)( - IInternetProtocolSink* me, ULONG status_code, LPCWSTR status_text); - -// Patches methods of urlmon's IHttpNegotiate implementation for the purposes -// of adding to the http user agent header. - -// Also patches one of the IBindStatusCallback implementations in urlmon to pick -// up an IBinding during the StartBinding call. The IBinding implementor then -// gets a patch applied to its IInternetProtocolSink's ReportProgress method. -// The patched is there so that the reporting of the MIME type to the IBinding -// implementor can be changed if an X-Chrome-Frame HTTP header is present -// in the response headers. If anyone can suggest a more straightforward way of -// doing this, I would be eternally grateful. -class HttpNegotiatePatch { - // class is not to be instantiated atm. - HttpNegotiatePatch(); - ~HttpNegotiatePatch(); - - public: - static bool Initialize(); - static void Uninitialize(); - - // IHttpNegotiate patch methods - static STDMETHODIMP BeginningTransaction( - IHttpNegotiate_BeginningTransaction_Fn original, IHttpNegotiate* me, - LPCWSTR url, LPCWSTR headers, DWORD reserved, LPWSTR* additional_headers); - - protected: - static HRESULT PatchHttpNegotiate(IUnknown* to_patch); - - private: - DISALLOW_COPY_AND_ASSIGN(HttpNegotiatePatch); -}; - // From the latest urlmon.h. Symbol name prepended with LOCAL_ to // avoid conflict (and therefore build errors) for those building with // a newer Windows SDK. |