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

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

Issue 5231751647461376: Issue 1264 - Generate custom response for subdocument on subdomain request (Closed)
Patch Set: move opening braces on the new line Created Sept. 8, 2014, 8:42 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
« no previous file with comments | « src/plugin/PluginWbPassThrough.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Sink* pSink = GetSink(static_cast<const Protocol*>(this)); 366 Sink* pSink = GetSink(static_cast<const Protocol*>(this));
366 HRESULT hr = pSink->OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, 367 HRESULT hr = pSink->OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI,
367 » » dwReserved, pTargetProtocol); 368 » » dwReserved, pTargetProtocol, handled);
368 369
369 CComPtr<IInternetProtocolSink> spSink; 370 CComPtr<IInternetProtocolSink> spSink;
370 CComPtr<IInternetBindInfo> spBindInfo; 371 CComPtr<IInternetBindInfo> spBindInfo;
371 if (SUCCEEDED(hr)) 372 if (SUCCEEDED(hr))
372 { 373 {
373 hr = pSink->QueryInterface(IID_IInternetProtocolSink, 374 hr = pSink->QueryInterface(IID_IInternetProtocolSink,
374 reinterpret_cast<void**>(&spSink)); 375 reinterpret_cast<void**>(&spSink));
375 ATLASSERT(SUCCEEDED(hr) && spSink != 0); 376 ATLASSERT(SUCCEEDED(hr) && spSink != 0);
376 } 377 }
377 if (SUCCEEDED(hr)) 378 if (SUCCEEDED(hr))
378 { 379 {
379 hr = pSink->QueryInterface(IID_IInternetBindInfo, 380 hr = pSink->QueryInterface(IID_IInternetBindInfo,
380 reinterpret_cast<void**>(&spBindInfo)); 381 reinterpret_cast<void**>(&spBindInfo));
381 ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0); 382 ATLASSERT(SUCCEEDED(hr) && spBindInfo != 0);
382 } 383 }
383 » if (SUCCEEDED(hr)) 384 » if (SUCCEEDED(hr) && !handled)
384 { 385 {
385 hr = pTargetProtocol->Start(szUrl, spSink, spBindInfo, grfPI, 386 hr = pTargetProtocol->Start(szUrl, spSink, spBindInfo, grfPI,
386 dwReserved); 387 dwReserved);
387 } 388 }
388 return hr; 389 return hr;
389 } 390 }
390 391
391 392
392 template <class Protocol, class Sink> 393 template <class Protocol, class Sink>
393 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink( 394 inline Sink* CustomSinkStartPolicy<Protocol, Sink>::GetSink(
(...skipping 11 matching lines...) Expand all
405 template <class Protocol, class Sink> 406 template <class Protocol, class Sink>
406 inline Protocol* CustomSinkStartPolicy<Protocol, Sink>::GetProtocol( 407 inline Protocol* CustomSinkStartPolicy<Protocol, Sink>::GetProtocol(
407 const Sink* pSink) 408 const Sink* pSink)
408 { 409 {
409 return Protocol::ComObjectClass::GetProtocol(pSink); 410 return Protocol::ComObjectClass::GetProtocol(pSink);
410 } 411 }
411 412
412 } // end namespace PassthroughAPP 413 } // end namespace PassthroughAPP
413 414
414 #endif // PASSTHROUGHAPP_SINKPOLICY_INL 415 #endif // PASSTHROUGHAPP_SINKPOLICY_INL
OLDNEW
« no previous file with comments | « src/plugin/PluginWbPassThrough.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld