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

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

Issue 5748224216268800: No issue - some cleanup in PluginWbPassThrough (Closed)
Left Patch Set: Created Nov. 13, 2014, 10:20 a.m.
Right Patch Set: remove verifying of szHeaders Created Nov. 19, 2014, 11:04 a.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/PluginWbPassThrough.h ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginWbPassThrough.h" 3 #include "PluginWbPassThrough.h"
4 #include "PluginClient.h" 4 #include "PluginClient.h"
5 #include "PluginClientFactory.h" 5 #include "PluginClientFactory.h"
6 #include "PluginFilter.h" 6 #include "PluginFilter.h"
7 #include "PluginSettings.h" 7 #include "PluginSettings.h"
8 #include "PluginClass.h" 8 #include "PluginClass.h"
9 #include "PluginSystem.h" 9 #include "PluginSystem.h"
10 #include <WinInet.h> 10 #include <WinInet.h>
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 ) 267 )
268 { 268 {
269 return true; 269 return true;
270 } 270 }
271 } 271 }
272 return false; 272 return false;
273 } 273 }
274 274
275 STDMETHODIMP WBPassthruSink::BeginningTransaction(LPCWSTR szURL, LPCWSTR szHeade rs, DWORD dwReserved, LPWSTR* pszAdditionalHeaders) 275 STDMETHODIMP WBPassthruSink::BeginningTransaction(LPCWSTR szURL, LPCWSTR szHeade rs, DWORD dwReserved, LPWSTR* pszAdditionalHeaders)
276 { 276 {
277 if (!szURL || !szHeaders) 277 if (!szURL)
Oleksandr 2014/11/19 02:34:59 Why can't szHeaders be nullptr? I think it may hap
sergei 2014/11/19 11:05:02 May be it can. I assumed that if it's [in] paramet
278 { 278 {
279 return E_POINTER; 279 return E_POINTER;
280 } 280 }
281 std::wstring src = szURL; 281 std::wstring src = szURL;
282 DEBUG_GENERAL(ToCString(src)); 282 DEBUG_GENERAL(ToCString(src));
283 283
284 std::string acceptHeader = ExtractHttpAcceptHeader(m_spTargetProtocol); 284 std::string acceptHeader = ExtractHttpAcceptHeader(m_spTargetProtocol);
285 m_contentType = GetContentTypeFromMimeType(ATL::CString(acceptHeader.c_str())) ; 285 m_contentType = GetContentTypeFromMimeType(ATL::CString(acceptHeader.c_str())) ;
286 286
287 if (pszAdditionalHeaders) 287 if (pszAdditionalHeaders)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 384 }
385 385
386 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol); 386 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol);
387 } 387 }
388 388
389 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o ut] */ ULONG *pcbRead) 389 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o ut] */ ULONG *pcbRead)
390 { 390 {
391 WBPassthruSink* pSink = GetSink(); 391 WBPassthruSink* pSink = GetSink();
392 return pSink->OnRead(pv, cb, pcbRead); 392 return pSink->OnRead(pv, cb, pcbRead);
393 } 393 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld