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

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

Issue 5316782940225536: Issue 1557 - Update to the recent libadblockplus to reduce additional updates in the logic later. (Closed)
Patch Set: update to fixed libadblockplus Created Nov. 24, 2014, 11:07 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/PluginFilter.cpp ('k') | src/plugin/PluginWbPassThrough.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 #pragma once 1 #pragma once
2 #include <cstdint> 2 #include <cstdint>
3 #include <AdblockPlus/FilterEngine.h>
3 #include "ProtocolCF.h" 4 #include "ProtocolCF.h"
4 #include "ProtocolImpl.h" 5 #include "ProtocolImpl.h"
5 #define IE_MAX_URL_LENGTH 2048 6 #define IE_MAX_URL_LENGTH 2048
6 7
7 class WBPassthruSink : 8 class WBPassthruSink :
8 public PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CComM ultiThreadModel>, 9 public PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CComM ultiThreadModel>,
9 public IHttpNegotiate 10 public IHttpNegotiate
10 { 11 {
11 typedef PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CCom MultiThreadModel> BaseClass; 12 typedef PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CCom MultiThreadModel> BaseClass;
12 13
13 public: 14 public:
14 WBPassthruSink(); 15 WBPassthruSink();
15 16
16 uint64_t m_currentPositionOfSentPage; 17 uint64_t m_currentPositionOfSentPage;
17 CComPtr<IInternetProtocol> m_pTargetProtocol; 18 CComPtr<IInternetProtocol> m_pTargetProtocol;
18 » int m_contentType; 19 » AdblockPlus::FilterEngine::ContentType m_contentType;
19 std::wstring m_boundDomain; 20 std::wstring m_boundDomain;
20 bool m_blockedInTransaction; 21 bool m_blockedInTransaction;
21 22
22 » int GetContentTypeFromMimeType(const CString& mimeType); 23 » AdblockPlus::FilterEngine::ContentType GetContentTypeFromMimeType(const CString& mimeType);
23 » int GetContentTypeFromURL(const CString& src); 24 » AdblockPlus::FilterEngine::ContentType GetContentTypeFromURL(const CStri ng& src);
24 » int GetContentType(const CString& mimeType, const std::wstring& domain, const CString& src); 25 » AdblockPlus::FilterEngine::ContentType GetContentType(const CString& mim eType, const std::wstring& domain, const CString& src);
25 bool IsFlashRequest(const wchar_t* const* additionalHeaders); 26 bool IsFlashRequest(const wchar_t* const* additionalHeaders);
26 public: 27 public:
27 BEGIN_COM_MAP(WBPassthruSink) 28 BEGIN_COM_MAP(WBPassthruSink)
28 COM_INTERFACE_ENTRY(IHttpNegotiate) 29 COM_INTERFACE_ENTRY(IHttpNegotiate)
29 COM_INTERFACE_ENTRY_CHAIN(BaseClass) 30 COM_INTERFACE_ENTRY_CHAIN(BaseClass)
30 END_COM_MAP() 31 END_COM_MAP()
31 32
32 BEGIN_SERVICE_MAP(WBPassthruSink) 33 BEGIN_SERVICE_MAP(WBPassthruSink)
33 SERVICE_ENTRY(IID_IHttpNegotiate) 34 SERVICE_ENTRY(IID_IHttpNegotiate)
34 END_SERVICE_MAP() 35 END_SERVICE_MAP()
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 WBPassthru(); 74 WBPassthru();
74 // IInternetProtocolRoot 75 // IInternetProtocolRoot
75 STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, 76 STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink,
76 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override ; 77 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override ;
77 78
78 //IInternetProtocol 79 //IInternetProtocol
79 STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULO NG *pcbRead) override; 80 STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULO NG *pcbRead) override;
80 81
81 bool m_shouldSupplyCustomContent; 82 bool m_shouldSupplyCustomContent;
82 }; 83 };
OLDNEW
« no previous file with comments | « src/plugin/PluginFilter.cpp ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld