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

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

Issue 10955040: Fix domain whitelisting and remove unused code (Closed)
Patch Set: Addressed all issues Created June 25, 2013, 2:19 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 #ifdef SUPPORT_FILTER 6 #ifdef SUPPORT_FILTER
7 #include "PluginFilter.h" 7 #include "PluginFilter.h"
8 #endif 8 #endif
9 #include "PluginSettings.h" 9 #include "PluginSettings.h"
10 #include "PluginClass.h" 10 #include "PluginClass.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 CPluginClient* client = CPluginClient::GetInstance(); 174 CPluginClient* client = CPluginClient::GetInstance();
175 175
176 if (tab && client) 176 if (tab && client)
177 { 177 {
178 CString documentUrl = tab->GetDocumentUrl(); 178 CString documentUrl = tab->GetDocumentUrl();
179 // Page is identical to document => don't block 179 // Page is identical to document => don't block
180 if (documentUrl == src) 180 if (documentUrl == src)
181 { 181 {
182 // fall through 182 // fall through
183 } 183 }
184 else if (CPluginSettings::GetInstance()->IsPluginEnabled() && !client->IsUrl WhiteListed(documentUrl)) 184 else if (CPluginSettings::GetInstance()->IsPluginEnabled() && !client->IsWhi telistedUrl(ToUtf8String(std::wstring(documentUrl))))
185 { 185 {
186 CString domain = tab->GetDocumentDomain(); 186 CString domain = tab->GetDocumentDomain();
187 187
188 contentType = CFilter::contentTypeAny; 188 contentType = CFilter::contentTypeAny;
189 189
190 #ifdef SUPPORT_FRAME_CACHING 190 #ifdef SUPPORT_FRAME_CACHING
191 if ((tab != 0) && (tab->IsFrameCached(src))) 191 if ((tab != 0) && (tab->IsFrameCached(src)))
192 { 192 {
193 contentType = CFilter::contentTypeSubdocument; 193 contentType = CFilter::contentTypeSubdocument;
194 } 194 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 CComPtr<IHttpNegotiate> spHttpNegotiate; 363 CComPtr<IHttpNegotiate> spHttpNegotiate;
364 QueryServiceFromClient(&spHttpNegotiate); 364 QueryServiceFromClient(&spHttpNegotiate);
365 365
366 return spHttpNegotiate ? spHttpNegotiate->OnResponse(dwResponseCode, szRespons eHeaders, szRequestHeaders, pszAdditionalRequestHeaders) : S_OK; 366 return spHttpNegotiate ? spHttpNegotiate->OnResponse(dwResponseCode, szRespons eHeaders, szRequestHeaders, pszAdditionalRequestHeaders) : S_OK;
367 } 367 }
368 368
369 STDMETHODIMP WBPassthruSink::ReportProgress(ULONG ulStatusCode, LPCWSTR szStatus Text) 369 STDMETHODIMP WBPassthruSink::ReportProgress(ULONG ulStatusCode, LPCWSTR szStatus Text)
370 { 370 {
371 return m_spInternetProtocolSink ? m_spInternetProtocolSink->ReportProgress(ulS tatusCode, szStatusText) : S_OK; 371 return m_spInternetProtocolSink ? m_spInternetProtocolSink->ReportProgress(ulS tatusCode, szStatusText) : S_OK;
372 } 372 }
OLDNEW

Powered by Google App Engine
This is Rietveld