| OLD | NEW |
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 | 2 |
| 3 #include "PluginSettings.h" | 3 #include "PluginSettings.h" |
| 4 #include "PluginSystem.h" | 4 #include "PluginSystem.h" |
| 5 #include "PluginFilter.h" | 5 #include "PluginFilter.h" |
| 6 #include "PluginClientFactory.h" | 6 #include "PluginClientFactory.h" |
| 7 #include "PluginHttpRequest.h" | 7 #include "PluginHttpRequest.h" |
| 8 #include "PluginMutex.h" | 8 #include "PluginMutex.h" |
| 9 #include "PluginClass.h" | 9 #include "PluginClass.h" |
| 10 | 10 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 bool CAdblockPlusClient::IsUrlWhiteListed(const CString& url) | 190 bool CAdblockPlusClient::IsUrlWhiteListed(const CString& url) |
| 191 { | 191 { |
| 192 bool isWhitelisted = CPluginClientBase::IsUrlWhiteListed(url); | 192 bool isWhitelisted = CPluginClientBase::IsUrlWhiteListed(url); |
| 193 if (isWhitelisted == false && !url.IsEmpty()) | 193 if (isWhitelisted == false && !url.IsEmpty()) |
| 194 { | 194 { |
| 195 m_criticalSectionFilter.Lock(); | 195 m_criticalSectionFilter.Lock(); |
| 196 { | 196 { |
| 197 isWhitelisted = m_filter.get() && m_filter->ShouldWhiteList(url); | 197 isWhitelisted = m_filter.get() && m_filter->ShouldWhiteList(url); |
| 198 } | 198 } |
| 199 m_criticalSectionFilter.Unlock(); | 199 m_criticalSectionFilter.Unlock(); |
| 200 | |
| 201 if (isWhitelisted) | |
| 202 { | |
| 203 CacheWhiteListedUrl(url, isWhitelisted); | |
| 204 } | |
| 205 } | 200 } |
| 206 | 201 |
| 207 return isWhitelisted; | 202 return isWhitelisted; |
| 208 } | 203 } |
| 209 | 204 |
| 210 int CAdblockPlusClient::GetIEVersion() | 205 int CAdblockPlusClient::GetIEVersion() |
| 211 { | 206 { |
| 212 //HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer | 207 //HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer |
| 213 HKEY hKey; | 208 HKEY hKey; |
| 214 LSTATUS status = RegOpenKey(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Interne
t Explorer", &hKey); | 209 LSTATUS status = RegOpenKey(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Interne
t Explorer", &hKey); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 350 |
| 356 try | 351 try |
| 357 { | 352 { |
| 358 CallAdblockPlusEngineProcedure(request); | 353 CallAdblockPlusEngineProcedure(request); |
| 359 } | 354 } |
| 360 catch (const std::exception& e) | 355 catch (const std::exception& e) |
| 361 { | 356 { |
| 362 DEBUG_GENERAL(e.what()); | 357 DEBUG_GENERAL(e.what()); |
| 363 } | 358 } |
| 364 } | 359 } |
| 360 |
| 361 void CAdblockPlusClient::RemoveFilter(const std::string& text) |
| 362 { |
| 363 Communication::OutputBuffer request; |
| 364 request << Communication::PROC_REMOVE_FILTER << text; |
| 365 |
| 366 try |
| 367 { |
| 368 CallAdblockPlusEngineProcedure(request); |
| 369 } |
| 370 catch (const std::exception& e) |
| 371 { |
| 372 DEBUG_GENERAL(e.what()); |
| 373 } |
| 374 } |
| OLD | NEW |