| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 375 ATLASSERT(SUCCEEDED(hr) && spSink != 0); | 375 ATLASSERT(SUCCEEDED(hr) && spSink != 0); |
| 376 } | 376 } |
| 377 if (SUCCEEDED(hr)) | 377 if (SUCCEEDED(hr)) |
| 378 { | 378 { |
| 379 hr = pSink->QueryInterface(IID_IInternetBindInfo, reinterpret_ca st<void**>(&spBindInfo)); | 379 hr = pSink->QueryInterface(IID_IInternetBindInfo, reinterpret_ca st<void**>(&spBindInfo)); |
| 380 ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0); | 380 ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0); |
| 381 } | 381 } |
| 382 if (SUCCEEDED(hr) && !handled) | 382 if (SUCCEEDED(hr) && !handled) |
| 383 { | 383 { |
| 384 hr = pTargetProtocol->Start(szUrl, spSink, spBindInfo, grfPI, dw Reserved); | 384 hr = pTargetProtocol->Start(szUrl, spSink, spBindInfo, grfPI, dw Reserved); |
| 385 static_cast<Protocol*>(this)->m_hasOriginalStartCalled = true; | |
| 386 } | |
| 387 if (E_ABORT == hr && pSink->m_blockedInTransaction) | |
|
sergei
2014/10/31 12:47:57
It should not be removed, only one line with m_has
Oleksandr
2014/10/31 15:22:07
You're right. Removing this would not let us respo
| |
| 388 { | |
| 389 static_cast<Protocol*>(this)->m_shouldSupplyCustomContent = true ; | |
| 390 pSink->m_spInternetProtocolSink->ReportProgress(BINDSTATUS_MIMET YPEAVAILABLE, L"text/html"); | |
| 391 pSink->m_spInternetProtocolSink->ReportData(BSCF_FIRSTDATANOTIFI CATION, 0, static_cast<ULONG>(g_blockedByABPPage.size())); | |
| 392 return S_OK; | |
| 393 } | 385 } |
| 394 return hr; | 386 return hr; |
| 395 } | 387 } |
| 396 | 388 |
| 397 | 389 |
| 398 template <class Protocol, class Sink> | 390 template <class Protocol, class Sink> |
| 399 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink( | 391 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink( |
| 400 const Protocol* pProtocol) | 392 const Protocol* pProtocol) |
| 401 { | 393 { |
| 402 return Protocol::ComObjectClass::GetSink(pProtocol); | 394 return Protocol::ComObjectClass::GetSink(pProtocol); |
| 403 } | 395 } |
| 404 | 396 |
| 405 template <class Protocol, class Sink> | 397 template <class Protocol, class Sink> |
| 406 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink() const | 398 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink() const |
| 407 { | 399 { |
| 408 return GetSink(static_cast<const Protocol*>(this)); | 400 return GetSink(static_cast<const Protocol*>(this)); |
| 409 } | 401 } |
| 410 | 402 |
| 411 template <class Protocol, class Sink> | 403 template <class Protocol, class Sink> |
| 412 inline Protocol* CustomSinkStartPolicy<Protocol, Sink>::GetProtocol( | 404 inline Protocol* CustomSinkStartPolicy<Protocol, Sink>::GetProtocol( |
| 413 const Sink* pSink) | 405 const Sink* pSink) |
| 414 { | 406 { |
| 415 return Protocol::ComObjectClass::GetProtocol(pSink); | 407 return Protocol::ComObjectClass::GetProtocol(pSink); |
| 416 } | 408 } |
| 417 | 409 |
| 418 } // end namespace PassthroughAPP | 410 } // end namespace PassthroughAPP |
| 419 | 411 |
| 420 #endif // PASSTHROUGHAPP_SINKPOLICY_INL | 412 #endif // PASSTHROUGHAPP_SINKPOLICY_INL |
| OLD | NEW |