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

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

Issue 5171515343503360: Issue #41 - Bring method of determining IE version up to date (Closed)
Left Patch Set: Final (?) Created Jan. 4, 2015, 11:02 p.m.
Right Patch Set: Final (?) 2 Created Jan. 5, 2015, 1:02 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/PluginTabBase.cpp ('k') | src/shared/IE_version.h » ('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 #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>
11 #include "wtypes.h" 11 #include "wtypes.h"
12 #include "../shared/Utils.h" 12 #include "../shared/Utils.h"
13 <Merge Conflict>#include "../shared/IE_version.h" 13 #include "../shared/IE_version.h"
sergei 2015/01/05 12:24:23 "Merge Conflict" Do we need this header here?
Eric 2015/01/05 13:08:21 And this is why I dislike rebase. The relevant ch
14 14
15 namespace 15 namespace
16 { 16 {
17 const std::string g_blockedByABPPage = "<!DOCTYPE html>" 17 const std::string g_blockedByABPPage = "<!DOCTYPE html>"
18 "<html>" 18 "<html>"
19 "<body>" 19 "<body>"
20 "<!-- blocked by AdblockPlus -->" 20 "<!-- blocked by AdblockPlus -->"
21 "</body>" 21 "</body>"
22 "</html>"; 22 "</html>";
23 23
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 { 148 {
149 return CFilter::contentTypeSubdocument; 149 return CFilter::contentTypeSubdocument;
150 } 150 }
151 return CFilter::contentTypeAny; 151 return CFilter::contentTypeAny;
152 } 152 }
153 153
154 int WBPassthruSink::GetContentType(const CString& mimeType, const std::wstring& domain, const CString& src) 154 int WBPassthruSink::GetContentType(const CString& mimeType, const std::wstring& domain, const CString& src)
155 { 155 {
156 // No referer or mime type 156 // No referer or mime type
157 // BINDSTRING_XDR_ORIGIN works only for IE v8+ 157 // BINDSTRING_XDR_ORIGIN works only for IE v8+
158 if (mimeType.IsEmpty() && domain.empty() && CPluginClient::GetInstance()->GetI EVersion() >= 8) 158 if (mimeType.IsEmpty() && domain.empty() && AdblockPlus::IE::InstalledMajorVer sion() >= 8)
sergei 2015/01/06 13:39:11 Actually we are supporting only versions starting
Eric 2015/01/06 17:10:34 You and Oleksandr and I had a discussion about thi
159 { 159 {
160 return CFilter::contentTypeXmlHttpRequest; 160 return CFilter::contentTypeXmlHttpRequest;
161 } 161 }
162 int contentType = GetContentTypeFromMimeType(mimeType); 162 int contentType = GetContentTypeFromMimeType(mimeType);
163 if (contentType == CFilter::contentTypeAny) 163 if (contentType == CFilter::contentTypeAny)
164 { 164 {
165 contentType = GetContentTypeFromURL(src); 165 contentType = GetContentTypeFromURL(src);
166 } 166 }
167 return contentType; 167 return contentType;
168 } 168 }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 } 389 }
390 390
391 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol); 391 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol);
392 } 392 }
393 393
394 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o ut] */ ULONG *pcbRead) 394 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o ut] */ ULONG *pcbRead)
395 { 395 {
396 WBPassthruSink* pSink = GetSink(); 396 WBPassthruSink* pSink = GetSink();
397 return pSink->OnRead(pv, cb, pcbRead); 397 return pSink->OnRead(pv, cb, pcbRead);
398 } 398 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld