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: Created Nov. 22, 2015, 8:17 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
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | test/plugin/InstancesTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // There doesn't seem to be any other way to get this header before the reques t has been made. 341 // There doesn't seem to be any other way to get this header before the reques t has been made.
342 HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL, szHeaders, dwReserved, pszAdditionalHeaders) : S_OK; 342 HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL, szHeaders, dwReserved, pszAdditionalHeaders) : S_OK;
343 343
344 if (pszAdditionalHeaders && *pszAdditionalHeaders) 344 if (pszAdditionalHeaders && *pszAdditionalHeaders)
345 { 345 {
346 m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Ref erer:", L"\n"); 346 m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Ref erer:", L"\n");
347 } 347 }
348 m_boundDomain = TrimString(m_boundDomain); 348 m_boundDomain = TrimString(m_boundDomain);
349 m_contentType = GetContentType(ATL::CString(acceptHeader.c_str()), m_boundDoma in, src); 349 m_contentType = GetContentType(ATL::CString(acceptHeader.c_str()), m_boundDoma in, src);
350 350
351 CPluginTab* tab = CPluginClass::GetTab(::GetCurrentThreadId()); 351 CPluginTab* tab = CPluginClass::GetTabCurrentThread();
352 CPluginClient* client = CPluginClient::GetInstance(); 352 CPluginClient* client = CPluginClient::GetInstance();
353 353
354 if (tab && client) 354 if (tab && client)
355 { 355 {
356 std::wstring documentUrl = tab->GetDocumentUrl(); 356 std::wstring documentUrl = tab->GetDocumentUrl();
357 // Page is identical to document => don't block 357 // Page is identical to document => don't block
358 if (documentUrl == src) 358 if (documentUrl == src)
359 { 359 {
360 return nativeHr; 360 return nativeHr;
361 } 361 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } 436 }
437 437
438 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol); 438 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol);
439 } 439 }
440 440
441 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o ut] */ ULONG *pcbRead) 441 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o ut] */ ULONG *pcbRead)
442 { 442 {
443 WBPassthruSink* pSink = GetSink(); 443 WBPassthruSink* pSink = GetSink();
444 return pSink->OnRead(pv, cb, pcbRead); 444 return pSink->OnRead(pv, cb, pcbRead);
445 } 445 }
OLDNEW
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | test/plugin/InstancesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld