OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 message >> specialization; | 159 message >> specialization; |
160 description.specialization = ToUtf16String(specialization); | 160 description.specialization = ToUtf16String(specialization); |
161 message >> description.listed; | 161 message >> description.listed; |
162 result.push_back(description); | 162 result.push_back(description); |
163 } | 163 } |
164 return result; | 164 return result; |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
168 CAdblockPlusClient* CAdblockPlusClient::s_instance = NULL; | 168 CAdblockPlusClient* CAdblockPlusClient::s_instance = NULL; |
| 169 CComAutoCriticalSection CAdblockPlusClient::s_criticalSectionLocal; |
169 | 170 |
170 CAdblockPlusClient::CAdblockPlusClient() : CPluginClientBase() | 171 CAdblockPlusClient::CAdblockPlusClient() |
171 { | 172 { |
172 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); | 173 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); |
173 } | 174 } |
174 | 175 |
175 bool CAdblockPlusClient::CallEngine(Communication::OutputBuffer& message, Commun
ication::InputBuffer& inputBuffer) | 176 bool CAdblockPlusClient::CallEngine(Communication::OutputBuffer& message, Commun
ication::InputBuffer& inputBuffer) |
176 { | 177 { |
177 DEBUG_GENERAL("CallEngine start"); | 178 DEBUG_GENERAL("CallEngine start"); |
178 CriticalSection::Lock lock(enginePipeLock); | 179 CriticalSection::Lock lock(enginePipeLock); |
179 try | 180 try |
180 { | 181 { |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 DEBUG_GENERAL("CompareVersions"); | 567 DEBUG_GENERAL("CompareVersions"); |
567 Communication::OutputBuffer request; | 568 Communication::OutputBuffer request; |
568 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S
tring(v2); | 569 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S
tring(v2); |
569 Communication::InputBuffer response; | 570 Communication::InputBuffer response; |
570 if (!CallEngine(request, response)) | 571 if (!CallEngine(request, response)) |
571 return 0; | 572 return 0; |
572 int result; | 573 int result; |
573 response >> result; | 574 response >> result; |
574 return result; | 575 return result; |
575 } | 576 } |
OLD | NEW |