Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/SinkPolicy.inl

Issue 6390087684194304: [superseded] Issue 1265 - Improve detection of mime type of the expected response (Closed)
Patch Set: Created Sept. 10, 2014, 7:34 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #ifndef PASSTHROUGHAPP_SINKPOLICY_INL 1 #ifndef PASSTHROUGHAPP_SINKPOLICY_INL
2 #define PASSTHROUGHAPP_SINKPOLICY_INL 2 #define PASSTHROUGHAPP_SINKPOLICY_INL
3 3
4 #if _MSC_VER > 1000 4 #if _MSC_VER > 1000
5 #pragma once 5 #pragma once
6 #endif // _MSC_VER > 1000 6 #endif // _MSC_VER > 1000
7 7
8 #ifndef PASSTHROUGHAPP_SINKPOLICY_H 8 #ifndef PASSTHROUGHAPP_SINKPOLICY_H
9 #error SinkPolicy.inl requires SinkPolicy.h to be included first 9 #error SinkPolicy.inl requires SinkPolicy.h to be included first
10 #endif 10 #endif
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // ===== CustomSinkStartPolicy ===== 355 // ===== CustomSinkStartPolicy =====
356 356
357 template <class Protocol, class Sink> 357 template <class Protocol, class Sink>
358 inline HRESULT CustomSinkStartPolicy<Protocol, Sink>::OnStart(LPCWSTR szUrl, 358 inline HRESULT CustomSinkStartPolicy<Protocol, Sink>::OnStart(LPCWSTR szUrl,
359 IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, 359 IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo,
360 DWORD grfPI, HANDLE_PTR dwReserved, 360 DWORD grfPI, HANDLE_PTR dwReserved,
361 IInternetProtocol* pTargetProtocol) const 361 IInternetProtocol* pTargetProtocol) const
362 { 362 {
363 ATLASSERT(pTargetProtocol != 0); 363 ATLASSERT(pTargetProtocol != 0);
364 364
365 bool handled = false; 365 » bool handled = false;
366 Sink* pSink = GetSink(static_cast<const Protocol*>(this)); 366 Sink* pSink = GetSink(static_cast<const Protocol*>(this));
367 HRESULT hr = pSink->OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, 367 HRESULT hr = pSink->OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI,
368 dwReserved, pTargetProtocol, handled); 368 dwReserved, pTargetProtocol, handled);
369 369
370 CComPtr<IInternetProtocolSink> spSink; 370 CComPtr<IInternetProtocolSink> spSink;
371 CComPtr<IInternetBindInfo> spBindInfo; 371 CComPtr<IInternetBindInfo> spBindInfo;
372 if (SUCCEEDED(hr)) 372 if (SUCCEEDED(hr))
373 { 373 {
374 » » hr = pSink->QueryInterface(IID_IInternetProtocolSink, 374 » » hr = pSink->QueryInterface(IID_IInternetProtocolSink, reinterpre t_cast<void**>(&spSink));
375 » » » reinterpret_cast<void**>(&spSink));
376 ATLASSERT(SUCCEEDED(hr) && spSink != 0); 375 ATLASSERT(SUCCEEDED(hr) && spSink != 0);
377 } 376 }
378 if (SUCCEEDED(hr)) 377 if (SUCCEEDED(hr))
379 { 378 {
380 » » hr = pSink->QueryInterface(IID_IInternetBindInfo, 379 » » hr = pSink->QueryInterface(IID_IInternetBindInfo, reinterpret_ca st<void**>(&spBindInfo));
381 » » » reinterpret_cast<void**>(&spBindInfo));
382 ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0); 380 ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0);
383 } 381 }
384 if (SUCCEEDED(hr) && !handled) 382 if (SUCCEEDED(hr) && !handled)
385 { 383 {
386 hr = pTargetProtocol->Start(szUrl, spSink, spBindInfo, grfPI, 384 hr = pTargetProtocol->Start(szUrl, spSink, spBindInfo, grfPI,
387 dwReserved); 385 dwReserved);
388 } 386 }
389 return hr; 387 return hr;
390 } 388 }
391 389
(...skipping 14 matching lines...) Expand all
406 template <class Protocol, class Sink> 404 template <class Protocol, class Sink>
407 inline Protocol* CustomSinkStartPolicy<Protocol, Sink>::GetProtocol( 405 inline Protocol* CustomSinkStartPolicy<Protocol, Sink>::GetProtocol(
408 const Sink* pSink) 406 const Sink* pSink)
409 { 407 {
410 return Protocol::ComObjectClass::GetProtocol(pSink); 408 return Protocol::ComObjectClass::GetProtocol(pSink);
411 } 409 }
412 410
413 } // end namespace PassthroughAPP 411 } // end namespace PassthroughAPP
414 412
415 #endif // PASSTHROUGHAPP_SINKPOLICY_INL 413 #endif // PASSTHROUGHAPP_SINKPOLICY_INL
OLDNEW
« src/plugin/PluginWbPassThrough.cpp ('K') | « src/plugin/PluginWbPassThrough.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld