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

Side by Side Diff: src/plugin/PluginWbPassThrough.cpp

Issue 29330403: Issue #1467, #3397 - Rewrite the map from threads to tabs (Closed)
Patch Set: rebase to current tip / address comments Created Feb. 3, 2016, 5:22 p.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 /* 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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // There doesn't seem to be any other way to get this header before the reques t has been made. 339 // There doesn't seem to be any other way to get this header before the reques t has been made.
340 HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL, szHeaders, dwReserved, pszAdditionalHeaders) : S_OK; 340 HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL, szHeaders, dwReserved, pszAdditionalHeaders) : S_OK;
341 341
342 if (pszAdditionalHeaders && *pszAdditionalHeaders) 342 if (pszAdditionalHeaders && *pszAdditionalHeaders)
343 { 343 {
344 m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Ref erer:", L"\n"); 344 m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Ref erer:", L"\n");
345 } 345 }
346 m_boundDomain = TrimString(m_boundDomain); 346 m_boundDomain = TrimString(m_boundDomain);
347 m_contentType = GetContentType(ToUtf16String(ExtractHttpAcceptHeader(m_spTarge tProtocol)), m_boundDomain, src); 347 m_contentType = GetContentType(ToUtf16String(ExtractHttpAcceptHeader(m_spTarge tProtocol)), m_boundDomain, src);
348 348
349 CPluginTab* tab = CPluginClass::GetTab(::GetCurrentThreadId()); 349 CPluginTab* tab = CPluginClass::GetTabCurrentThread();
350 CPluginClient* client = CPluginClient::GetInstance(); 350 CPluginClient* client = CPluginClient::GetInstance();
351 351
352 if (tab && client) 352 if (tab && client)
353 { 353 {
354 std::wstring documentUrl = tab->GetDocumentUrl(); 354 std::wstring documentUrl = tab->GetDocumentUrl();
355 // Page is identical to document => don't block 355 // Page is identical to document => don't block
356 if (documentUrl == src) 356 if (documentUrl == src)
357 { 357 {
358 return nativeHr; 358 return nativeHr;
359 } 359 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } 445 }
446 446
447 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol); 447 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol);
448 } 448 }
449 449
450 STDMETHODIMP WbPassthroughProtocol::Read(/* [in, out] */ void *pv,/* [in] */ ULO NG cb,/* [out] */ ULONG *pcbRead) 450 STDMETHODIMP WbPassthroughProtocol::Read(/* [in, out] */ void *pv,/* [in] */ ULO NG cb,/* [out] */ ULONG *pcbRead)
451 { 451 {
452 WBPassthruSink* pSink = GetSink(); 452 WBPassthruSink* pSink = GetSink();
453 return pSink->OnRead(pv, cb, pcbRead); 453 return pSink->OnRead(pv, cb, pcbRead);
454 } 454 }
OLDNEW

Powered by Google App Engine
This is Rietveld