diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 17:31:25 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 17:31:25 +0000 |
commit | 3f3130a68035f8317100d98e3e3b3ab49cf6ebb3 (patch) | |
tree | 7ac5bc311d687654ffb315d171502a53ffd6cbc4 /chrome_frame/http_negotiate.cc | |
parent | 90242e9e03d4eeff67d9fbc97e555597206c69d1 (diff) | |
download | chromium_src-3f3130a68035f8317100d98e3e3b3ab49cf6ebb3.zip chromium_src-3f3130a68035f8317100d98e3e3b3ab49cf6ebb3.tar.gz chromium_src-3f3130a68035f8317100d98e3e3b3ab49cf6ebb3.tar.bz2 |
Implement HTTP headers sniffing in the ProtocolSinkWrap, instead of relying on IHttpNegotiate patch.
Moved some code based on over-conservative assumptions to execute earlier in pipeline.
Will prevent BUG=38480 to manifest itself.
BUG=47879
Review URL: http://codereview.chromium.org/2987001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/http_negotiate.cc')
-rw-r--r-- | chrome_frame/http_negotiate.cc | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/chrome_frame/http_negotiate.cc b/chrome_frame/http_negotiate.cc index 87dc65c5..30d7961 100644 --- a/chrome_frame/http_negotiate.cc +++ b/chrome_frame/http_negotiate.cc @@ -173,17 +173,21 @@ HRESULT HttpNegotiatePatch::PatchHttpNegotiate(IUnknown* to_patch) { << StringPrintf("IHttpNegotiate not supported 0x%08X", hr); } - ScopedComPtr<IBindStatusCallback> bscb; - hr = bscb.QueryFrom(to_patch); - - if (bscb) { - hr = vtable_patch::PatchInterfaceMethods(bscb, - IBindStatusCallback_PatchInfo); - DLOG_IF(ERROR, FAILED(hr)) - << StringPrintf("BindStatusCallback patch failed 0x%08X", hr); - } else { - DLOG(WARNING) << StringPrintf("IBindStatusCallback not supported 0x%08X", - hr); + // CTransaction patch supports sniffing HTTP headers, so no need of + // sniffing inside HttpNegotiatePatch::ReportProgress. + if (GetPatchMethod() != PATCH_METHOD_INET_PROTOCOL) { + ScopedComPtr<IBindStatusCallback> bscb; + hr = bscb.QueryFrom(to_patch); + + if (bscb) { + hr = vtable_patch::PatchInterfaceMethods(bscb, + IBindStatusCallback_PatchInfo); + DLOG_IF(ERROR, FAILED(hr)) + << StringPrintf("BindStatusCallback patch failed 0x%08X", hr); + } else { + DLOG(WARNING) << StringPrintf("IBindStatusCallback not supported 0x%08X", + hr); + } } return hr; } |