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

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

Issue 29332835: Noissue - Clean up in 'WbPassthruSink' (Closed)
Patch Set: Created Dec. 16, 2015, 5:29 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 | « no previous file | 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 /* 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 13 matching lines...) Expand all
24 24
25 class WBPassthruSink : 25 class WBPassthruSink :
26 public PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CComMultiTh readModel>, 26 public PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CComMultiTh readModel>,
27 public IHttpNegotiate 27 public IHttpNegotiate
28 { 28 {
29 typedef PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CComMultiT hreadModel> BaseClass; 29 typedef PassthroughAPP::CInternetProtocolSinkWithSP<WBPassthruSink, CComMultiT hreadModel> BaseClass;
30 30
31 public: 31 public:
32 WBPassthruSink(); 32 WBPassthruSink();
33 33
34 bool m_isCustomResponse;
35
36 private:
34 uint64_t m_currentPositionOfSentPage; 37 uint64_t m_currentPositionOfSentPage;
35 CComPtr<IInternetProtocol> m_pTargetProtocol; 38 CComPtr<IInternetProtocol> m_pTargetProtocol;
36 AdblockPlus::FilterEngine::ContentType m_contentType; 39 AdblockPlus::FilterEngine::ContentType m_contentType;
37 std::wstring m_boundDomain; 40 std::wstring m_boundDomain;
38 bool m_isCustomResponse;
39
40 private:
41 AdblockPlus::FilterEngine::ContentType GetContentTypeFromMimeType(const std::w string& mimeType);
42 AdblockPlus::FilterEngine::ContentType GetContentTypeFromURL(const std::wstrin g& src);
43 AdblockPlus::FilterEngine::ContentType GetContentType(const std::wstring& mime Type, const std::wstring& domain, const std::wstring& src);
44 bool IsFlashRequest(const wchar_t* const* additionalHeaders); 41 bool IsFlashRequest(const wchar_t* const* additionalHeaders);
45 42
46 public: 43 public:
47 BEGIN_COM_MAP(WBPassthruSink) 44 BEGIN_COM_MAP(WBPassthruSink)
48 COM_INTERFACE_ENTRY(IHttpNegotiate) 45 COM_INTERFACE_ENTRY(IHttpNegotiate)
49 COM_INTERFACE_ENTRY_CHAIN(BaseClass) 46 COM_INTERFACE_ENTRY_CHAIN(BaseClass)
50 END_COM_MAP() 47 END_COM_MAP()
51 48
52 BEGIN_SERVICE_MAP(WBPassthruSink) 49 BEGIN_SERVICE_MAP(WBPassthruSink)
53 SERVICE_ENTRY(IID_IHttpNegotiate) 50 SERVICE_ENTRY(IID_IHttpNegotiate)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 WBPassthru(); 91 WBPassthru();
95 // IInternetProtocolRoot 92 // IInternetProtocolRoot
96 STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, 93 STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink,
97 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override ; 94 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override ;
98 95
99 // IInternetProtocol 96 // IInternetProtocol
100 STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULO NG *pcbRead) override; 97 STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULO NG *pcbRead) override;
101 98
102 bool m_shouldSupplyCustomContent; 99 bool m_shouldSupplyCustomContent;
103 }; 100 };
OLDNEW
« no previous file with comments | « no previous file | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld