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

Delta Between Two Patch Sets: src/plugin/PluginWbPassThrough.h

Issue 29331590: Issue #1484 - Make PassthroughAPP a pass-through again (Closed)
Left Patch Set: Created Nov. 30, 2015, 1:48 p.m.
Right Patch Set: Created Dec. 22, 2015, 2:31 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/PluginMimeFilterClient.cpp ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 END_COM_MAP() 50 END_COM_MAP()
51 51
52 BEGIN_SERVICE_MAP(WBPassthruSink) 52 BEGIN_SERVICE_MAP(WBPassthruSink)
53 SERVICE_ENTRY(IID_IHttpNegotiate) 53 SERVICE_ENTRY(IID_IHttpNegotiate)
54 END_SERVICE_MAP() 54 END_SERVICE_MAP()
55 55
56 STDMETHODIMP BeginningTransaction( 56 STDMETHODIMP BeginningTransaction(
57 /* [in] */ LPCWSTR szURL, 57 /* [in] */ LPCWSTR szURL,
58 /* [in] */ LPCWSTR szHeaders, 58 /* [in] */ LPCWSTR szHeaders,
59 /* [in] */ DWORD dwReserved, 59 /* [in] */ DWORD dwReserved,
60 /* [out] */ LPWSTR *pszAdditionalHeaders); 60 /* [out] */ LPWSTR* pszAdditionalHeaders);
61 61
62 STDMETHODIMP OnResponse( 62 STDMETHODIMP OnResponse(
63 /* [in] */ DWORD dwResponseCode, 63 /* [in] */ DWORD dwResponseCode,
64 /* [in] */ LPCWSTR szResponseHeaders, 64 /* [in] */ LPCWSTR szResponseHeaders,
65 /* [in] */ LPCWSTR szRequestHeaders, 65 /* [in] */ LPCWSTR szRequestHeaders,
66 /* [out] */ LPWSTR *pszAdditionalRequestHeaders); 66 /* [out] */ LPWSTR* pszAdditionalRequestHeaders);
67 67
68 HRESULT OnStart(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, 68 HRESULT OnStart(LPCWSTR szUrl, IInternetProtocolSink* pOIProtSink,
69 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved, 69 IInternetBindInfo* pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved,
70 IInternetProtocol* pTargetProtocol); 70 IInternetProtocol* pTargetProtocol);
71 71
72 HRESULT OnRead(void *pv, ULONG cb, ULONG* pcbRead); 72 HRESULT OnRead(void* pv, ULONG cb, ULONG* pcbRead);
73 73
74 STDMETHODIMP ReportProgress( 74 STDMETHODIMP ReportProgress(
75 /* [in] */ ULONG ulStatusCode, 75 /* [in] */ ULONG ulStatusCode,
76 /* [in] */ LPCWSTR szStatusText); 76 /* [in] */ LPCWSTR szStatusText);
77 77
78 STDMETHODIMP ReportResult( 78 STDMETHODIMP ReportResult(
79 /* [in] */ HRESULT hrResult, 79 /* [in] */ HRESULT hrResult,
80 /* [in] */ DWORD dwError, 80 /* [in] */ DWORD dwError,
81 /* [in] */ LPCWSTR szResult); 81 /* [in] */ LPCWSTR szResult);
82 82
83 STDMETHODIMP Switch( 83 STDMETHODIMP Switch(
84 /* [in] */ PROTOCOLDATA *pProtocolData); 84 /* [in] */ PROTOCOLDATA *pProtocolData);
85 }; 85 };
86 86
87 class WbPassthroughProtocol; 87 class WbPassthroughProtocol;
88 88
89 class WbPassthroughSinkStartPolicy 89 class WbPassthroughSinkStartPolicy
90 : public PassthroughAPP::CustomSinkStartPolicy<WbPassthroughProtocol, WBPassth ruSink> 90 : public PassthroughAPP::CustomSinkStartPolicy<WbPassthroughProtocol, WBPassth ruSink>
91 { 91 {
92 typedef PassthroughAPP::CustomSinkStartPolicy<WbPassthroughProtocol, WBPassthr uSink> BaseClass; 92 typedef PassthroughAPP::CustomSinkStartPolicy<WbPassthroughProtocol, WBPassthr uSink> BaseClass;
sergei 2015/12/22 14:04:40 I would use __super instead of BaseClass because i
93 public: 93 public:
94 HRESULT OnStart(LPCWSTR szUrl, 94 HRESULT OnStart(LPCWSTR szUrl,
95 IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, 95 IInternetProtocolSink* pOIProtSink, IInternetBindInfo* pOIBindInfo,
sergei 2015/12/22 14:04:40 Just noticed that we are using '*' and ' ' slightl
Eric 2015/12/22 14:34:31 I changed them all. Patch set 2 is rebase only. Pa
sergei 2015/12/22 14:39:37 It's also the same in cpp file, but for me it's no
96 DWORD grfPI, HANDLE_PTR dwReserved, 96 DWORD grfPI, HANDLE_PTR dwReserved,
97 IInternetProtocol* pTargetProtocol); 97 IInternetProtocol* pTargetProtocol);
98 }; 98 };
99 99
100 /** 100 /**
101 * Implementation of "Protocol" interfaces 101 * Implementation of "Protocol" interfaces
102 */ 102 */
103 class WbPassthroughProtocol 103 class WbPassthroughProtocol
104 : public PassthroughAPP::CInternetProtocol<WbPassthroughSinkStartPolicy> 104 : public PassthroughAPP::CInternetProtocol<WbPassthroughSinkStartPolicy>
105 { 105 {
106 typedef PassthroughAPP::CInternetProtocol<WbPassthroughSinkStartPolicy> BaseCl ass; 106 typedef PassthroughAPP::CInternetProtocol<WbPassthroughSinkStartPolicy> BaseCl ass;
107 public: 107 public:
108 WbPassthroughProtocol() 108 WbPassthroughProtocol()
109 : m_shouldSupplyCustomContent(false) 109 : m_shouldSupplyCustomContent(false)
110 { 110 {
111 } 111 }
112 112
113 // derived from IInternetProtocolRoot 113 // derived from IInternetProtocolRoot
114 STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, 114 STDMETHODIMP Start(LPCWSTR szUrl, IInternetProtocolSink* pOIProtSink,
115 IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override ; 115 IInternetBindInfo* pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) override ;
116 116
117 // derived from IInternetProtocol 117 // derived from IInternetProtocol
118 STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULO NG *pcbRead) override; 118 STDMETHODIMP Read(/* [in, out] */ void* pv,/* [in] */ ULONG cb,/* [out] */ ULO NG* pcbRead) override;
119 119
120 bool m_shouldSupplyCustomContent; 120 bool m_shouldSupplyCustomContent;
121 }; 121 };
122 122
123 typedef PassthroughAPP::CMetaFactory<PassthroughAPP::CComClassFactoryProtocol, W bPassthroughProtocol> MetaFactory; 123 typedef PassthroughAPP::CMetaFactory<PassthroughAPP::CComClassFactoryProtocol, W bPassthroughProtocol> MetaFactory;
124 124
125 125
LEFTRIGHT

Powered by Google App Engine
This is Rietveld