| OLD | NEW | 
|---|
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" | 
| 2 | 2 | 
| 3 #include "PluginWbPassThrough.h" | 3 #include "PluginWbPassThrough.h" | 
| 4 #include "PluginClient.h" | 4 #include "PluginClient.h" | 
| 5 #include "PluginClientFactory.h" | 5 #include "PluginClientFactory.h" | 
| 6 #ifdef SUPPORT_FILTER | 6 #ifdef SUPPORT_FILTER | 
| 7 #include "PluginFilter.h" | 7 #include "PluginFilter.h" | 
| 8 #endif | 8 #endif | 
| 9 #include "PluginSettings.h" | 9 #include "PluginSettings.h" | 
| 10 #include "PluginClass.h" | 10 #include "PluginClass.h" | 
| 11 #include "PluginSystem.h" | 11 #include "PluginSystem.h" | 
| 12 #include "Wrapper.h" | 12 #include "Wrapper.h" | 
| 13 #include "PluginUtil.h" | 13 #include "PluginUtil.h" | 
|  | 14 #include "../shared/Utils.h" | 
| 14 | 15 | 
| 15 #include "wtypes.h" | 16 #include "wtypes.h" | 
| 16 | 17 | 
| 17 EXTERN_C IMAGE_DOS_HEADER __ImageBase; | 18 EXTERN_C IMAGE_DOS_HEADER __ImageBase; | 
| 18 | 19 | 
| 19 | 20 | 
| 20 | 21 | 
| 21 int WBPassthruSink::GetContentTypeFromMimeType( std::wstring mime_type ) | 22 int WBPassthruSink::GetContentTypeFromMimeType( std::wstring mime_type ) | 
| 22 { | 23 { | 
| 23   if ( mime_type.find( L"image/" ) != std::wstring::npos ) | 24   if ( mime_type.find( L"image/" ) != std::wstring::npos ) | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 96   { | 97   { | 
| 97     return CFilter::contentTypeAny & ~CFilter::contentTypeSubdocument; | 98     return CFilter::contentTypeAny & ~CFilter::contentTypeSubdocument; | 
| 98   } | 99   } | 
| 99 | 100 | 
| 100 } | 101 } | 
| 101 | 102 | 
| 102 int WBPassthruSink::GetContentType(std::wstring mimeType, std::wstring domain, s
     td::wstring src) | 103 int WBPassthruSink::GetContentType(std::wstring mimeType, std::wstring domain, s
     td::wstring src) | 
| 103 { | 104 { | 
| 104   // No referer or mime type | 105   // No referer or mime type | 
| 105   // BINDSTRING_XDR_ORIGIN works only for IE v8+ | 106   // BINDSTRING_XDR_ORIGIN works only for IE v8+ | 
| 106   if (mimeType.empty() && domain.empty() && CPluginClient::GetInstance()->GetIEV
     ersion() >= 8) | 107   if (mimeType.empty() && domain.empty() && ABP::IE::installed_major_version() >
     = 8) | 
| 107   { | 108   { | 
| 108     return CFilter::contentTypeXmlHttpRequest; | 109     return CFilter::contentTypeXmlHttpRequest; | 
| 109   } | 110   } | 
| 110   int contentType = GetContentTypeFromMimeType(mimeType); | 111   int contentType = GetContentTypeFromMimeType(mimeType); | 
| 111   if (contentType == CFilter::contentTypeAny) | 112   if (contentType == CFilter::contentTypeAny) | 
| 112   { | 113   { | 
| 113     contentType = GetContentTypeFromURL(src); | 114     contentType = GetContentTypeFromURL(src); | 
| 114   } | 115   } | 
| 115   return contentType; | 116   return contentType; | 
| 116 } | 117 } | 
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 216   { | 217   { | 
| 217     CPluginDebug::DebugResultBlocking(type, src, boundDomain); | 218     CPluginDebug::DebugResultBlocking(type, src, boundDomain); | 
| 218   } | 219   } | 
| 219   else | 220   else | 
| 220   { | 221   { | 
| 221     CPluginDebug::DebugResultIgnoring(type, src, boundDomain); | 222     CPluginDebug::DebugResultIgnoring(type, src, boundDomain); | 
| 222   } | 223   } | 
| 223 #endif | 224 #endif | 
| 224 | 225 | 
| 225   //Fixes the iframe back button issue | 226   //Fixes the iframe back button issue | 
| 226   if (client->GetIEVersion() > 6) | 227   if (ABP::IE::installed_major_version() > 6) | 
| 227   { | 228   { | 
| 228     if ((contentType == CFilter::contentTypeImage) && (isBlocked)) | 229     if ((contentType == CFilter::contentTypeImage) && (isBlocked)) | 
| 229     { | 230     { | 
| 230       m_shouldBlock = true; | 231       m_shouldBlock = true; | 
| 231       BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTa
     rgetProtocol); | 232       BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTa
     rgetProtocol); | 
| 232 | 233 | 
| 233       return INET_E_REDIRECT_FAILED; | 234       return INET_E_REDIRECT_FAILED; | 
| 234 | 235 | 
| 235     } | 236     } | 
| 236     if (((contentType == CFilter::contentTypeSubdocument))&& (isBlocked)) | 237     if (((contentType == CFilter::contentTypeSubdocument))&& (isBlocked)) | 
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 381   return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, | 382   return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, | 
| 382     dwReserved, m_spInternetProtocol); | 383     dwReserved, m_spInternetProtocol); | 
| 383 } | 384 } | 
| 384 | 385 | 
| 385  STDMETHODIMP WBPassthru::Read( /* [in, out] */ void *pv,/* [in] */ ULONG cb,/* 
     [out] */ ULONG *pcbRead) | 386  STDMETHODIMP WBPassthru::Read( /* [in, out] */ void *pv,/* [in] */ ULONG cb,/* 
     [out] */ ULONG *pcbRead) | 
| 386  { | 387  { | 
| 387 | 388 | 
| 388    WBPassthruSink* pSink = GetSink(); | 389    WBPassthruSink* pSink = GetSink(); | 
| 389    return pSink->Read(pv, cb, pcbRead); | 390    return pSink->Read(pv, cb, pcbRead); | 
| 390  } | 391  } | 
| OLD | NEW | 
|---|