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

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

Issue 6390087684194304: [superseded] Issue 1265 - Improve detection of mime type of the expected response (Closed)
Patch Set: restore assuming XHR request type when xml is queried Created Sept. 11, 2014, 9:44 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/plugin/AdblockPlusClient.h ('k') | src/plugin/AdblockPlusDomTraverser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 #include "PluginSettings.h" 2 #include "PluginSettings.h"
3 #include "PluginSystem.h" 3 #include "PluginSystem.h"
4 #include "PluginFilter.h" 4 #include "PluginFilter.h"
5 #include "PluginClientFactory.h" 5 #include "PluginClientFactory.h"
6 #include "PluginMutex.h" 6 #include "PluginMutex.h"
7 #include "PluginClass.h" 7 #include "PluginClass.h"
8 8
9 #include "AdblockPlusClient.h" 9 #include "AdblockPlusClient.h"
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 202 }
203 203
204 instance = s_instance; 204 instance = s_instance;
205 } 205 }
206 s_criticalSectionLocal.Unlock(); 206 s_criticalSectionLocal.Unlock();
207 207
208 return instance; 208 return instance;
209 } 209 }
210 210
211 211
212 bool CAdblockPlusClient::ShouldBlock(CString src, int contentType, const CString & domain, bool addDebug) 212 bool CAdblockPlusClient::ShouldBlock(const CString& src, int contentType, const CString& domain, bool addDebug)
213 { 213 {
214 bool isBlocked = false; 214 bool isBlocked = false;
215 215
216 bool isCached = false; 216 bool isCached = false;
217 217
218 CPluginSettings* settings = CPluginSettings::GetInstance(); 218 CPluginSettings* settings = CPluginSettings::GetInstance();
219 219
220 m_criticalSectionCache.Lock(); 220 m_criticalSectionCache.Lock();
221 { 221 {
222 std::map<CString,bool>::iterator it = m_cacheBlockedSources.find(src); 222 std::map<CString,bool>::iterator it = m_cacheBlockedSources.find(src);
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 DEBUG_GENERAL("CompareVersions"); 578 DEBUG_GENERAL("CompareVersions");
579 Communication::OutputBuffer request; 579 Communication::OutputBuffer request;
580 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2); 580 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S tring(v2);
581 Communication::InputBuffer response; 581 Communication::InputBuffer response;
582 if (!CallEngine(request, response)) 582 if (!CallEngine(request, response))
583 return 0; 583 return 0;
584 int result; 584 int result;
585 response >> result; 585 response >> result;
586 return result; 586 return result;
587 } 587 }
OLDNEW
« no previous file with comments | « src/plugin/AdblockPlusClient.h ('k') | src/plugin/AdblockPlusDomTraverser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld