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

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

Issue 5171515343503360: Issue #41 - Bring method of determining IE version up to date (Closed)
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:
View unified diff | Download patch
OLDNEW
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 #include "../shared/IE_version.h"
13 14
14 namespace 15 namespace
15 { 16 {
16 const std::string g_blockedByABPPage = "<!DOCTYPE html>" 17 const std::string g_blockedByABPPage = "<!DOCTYPE html>"
17 "<html>" 18 "<html>"
18 "<body>" 19 "<body>"
19 "<!-- blocked by AdblockPlus -->" 20 "<!-- blocked by AdblockPlus -->"
20 "</body>" 21 "</body>"
21 "</html>"; 22 "</html>";
22 23
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 148 {
148 return CFilter::contentTypeSubdocument; 149 return CFilter::contentTypeSubdocument;
149 } 150 }
150 return CFilter::contentTypeAny; 151 return CFilter::contentTypeAny;
151 } 152 }
152 153
153 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)
154 { 155 {
155 // No referer or mime type 156 // No referer or mime type
156 // BINDSTRING_XDR_ORIGIN works only for IE v8+ 157 // BINDSTRING_XDR_ORIGIN works only for IE v8+
157 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
158 { 159 {
159 return CFilter::contentTypeXmlHttpRequest; 160 return CFilter::contentTypeXmlHttpRequest;
160 } 161 }
161 int contentType = GetContentTypeFromMimeType(mimeType); 162 int contentType = GetContentTypeFromMimeType(mimeType);
162 if (contentType == CFilter::contentTypeAny) 163 if (contentType == CFilter::contentTypeAny)
163 { 164 {
164 contentType = GetContentTypeFromURL(src); 165 contentType = GetContentTypeFromURL(src);
165 } 166 }
166 return contentType; 167 return contentType;
167 } 168 }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 389 }
389 390
390 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol); 391 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol);
391 } 392 }
392 393
393 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)
394 { 395 {
395 WBPassthruSink* pSink = GetSink(); 396 WBPassthruSink* pSink = GetSink();
396 return pSink->OnRead(pv, cb, pcbRead); 397 return pSink->OnRead(pv, cb, pcbRead);
397 } 398 }
OLDNEW
« no previous file with comments | « src/plugin/PluginTabBase.cpp ('k') | src/shared/IE_version.h » ('j') | test/RegistryTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld