OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 // There doesn't seem to be any other way to get this header before the reques
t has been made. | 338 // There doesn't seem to be any other way to get this header before the reques
t has been made. |
339 HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL,
szHeaders, dwReserved, pszAdditionalHeaders) : S_OK; | 339 HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL,
szHeaders, dwReserved, pszAdditionalHeaders) : S_OK; |
340 | 340 |
341 if (pszAdditionalHeaders && *pszAdditionalHeaders) | 341 if (pszAdditionalHeaders && *pszAdditionalHeaders) |
342 { | 342 { |
343 m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Ref
erer:", L"\n"); | 343 m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Ref
erer:", L"\n"); |
344 } | 344 } |
345 m_boundDomain = TrimString(m_boundDomain); | 345 m_boundDomain = TrimString(m_boundDomain); |
346 m_contentType = GetContentType(ToUtf16String(ExtractHttpAcceptHeader(m_spTarge
tProtocol)), m_boundDomain, src); | 346 m_contentType = GetContentType(ToUtf16String(ExtractHttpAcceptHeader(m_spTarge
tProtocol)), m_boundDomain, src); |
347 | 347 |
348 CPluginTab* tab = CPluginClass::GetTab(::GetCurrentThreadId()); | 348 CPluginTab* tab = CPluginClass::GetTabCurrentThread(); |
349 CPluginClient* client = CPluginClient::GetInstance(); | 349 CPluginClient* client = CPluginClient::GetInstance(); |
350 | 350 |
351 if (tab && client) | 351 if (tab && client) |
352 { | 352 { |
353 std::wstring documentUrl = tab->GetDocumentUrl(); | 353 std::wstring documentUrl = tab->GetDocumentUrl(); |
354 // Page is identical to document => don't block | 354 // Page is identical to document => don't block |
355 if (documentUrl == src) | 355 if (documentUrl == src) |
356 { | 356 { |
357 return nativeHr; | 357 return nativeHr; |
358 } | 358 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 } | 433 } |
434 | 434 |
435 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne
tProtocol); | 435 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne
tProtocol); |
436 } | 436 } |
437 | 437 |
438 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o
ut] */ ULONG *pcbRead) | 438 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o
ut] */ ULONG *pcbRead) |
439 { | 439 { |
440 WBPassthruSink* pSink = GetSink(); | 440 WBPassthruSink* pSink = GetSink(); |
441 return pSink->OnRead(pv, cb, pcbRead); | 441 return pSink->OnRead(pv, cb, pcbRead); |
442 } | 442 } |
OLD | NEW |