Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 #include <AdblockPlus.h> | 1 #include <AdblockPlus.h> |
2 #include <functional> | 2 #include <functional> |
3 #include <vector> | 3 #include <vector> |
4 #include <Windows.h> | 4 #include <Windows.h> |
5 | 5 |
6 #include "../shared/AutoHandle.h" | 6 #include "../shared/AutoHandle.h" |
7 #include "../shared/Communication.h" | 7 #include "../shared/Communication.h" |
8 #include "../shared/Dictionary.h" | 8 #include "../shared/Dictionary.h" |
9 #include "../shared/Utils.h" | 9 #include "../shared/Utils.h" |
10 #include "../shared/Version.h" | 10 #include "../shared/Version.h" |
(...skipping 23 matching lines...) Expand all Loading... | |
34 { | 34 { |
35 AdblockPlus::SubscriptionPtr subscription = subscriptions[i]; | 35 AdblockPlus::SubscriptionPtr subscription = subscriptions[i]; |
36 response << subscription->GetProperty("url")->AsString() | 36 response << subscription->GetProperty("url")->AsString() |
37 << subscription->GetProperty("title")->AsString() | 37 << subscription->GetProperty("title")->AsString() |
38 << subscription->GetProperty("specialization")->AsString() | 38 << subscription->GetProperty("specialization")->AsString() |
39 << subscription->IsListed(); | 39 << subscription->IsListed(); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 CriticalSection firstRunLock; | 43 CriticalSection firstRunLock; |
44 bool firstRunActionTaken = false; | 44 bool firstRunActionExecuted = false; |
Felix Dahlke
2013/07/25 14:54:37
"firstRunActionTaken" sounds wrong to my ears, I t
| |
45 | 45 |
46 Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) | 46 Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) |
47 { | 47 { |
48 Communication::OutputBuffer response; | 48 Communication::OutputBuffer response; |
49 | 49 |
50 Communication::ProcType procedure; | 50 Communication::ProcType procedure; |
51 request >> procedure; | 51 request >> procedure; |
52 switch (procedure) | 52 switch (procedure) |
53 { | 53 { |
54 case Communication::PROC_MATCHES: | 54 case Communication::PROC_MATCHES: |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 else if (valuePtr->IsNumber()) | 211 else if (valuePtr->IsNumber()) |
212 { | 212 { |
213 response << valuePtr->AsInt(); | 213 response << valuePtr->AsInt(); |
214 } | 214 } |
215 else if (valuePtr->IsString()) | 215 else if (valuePtr->IsString()) |
216 { | 216 { |
217 response << valuePtr->AsString(); | 217 response << valuePtr->AsString(); |
218 } | 218 } |
219 break; | 219 break; |
220 } | 220 } |
221 case Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED: | 221 case Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED: |
Felix Dahlke
2013/07/25 14:54:37
How about PROC_IS_FIRST_RUN? The function invoking
Oleksandr
2013/07/26 12:07:01
I would say the PROC_IS_FIRST_RUN would be confusi
Felix Dahlke
2013/08/02 10:52:24
Fair enough I guess. Might want to rename IsFirstR
| |
222 { | 222 { |
223 CriticalSection::Lock lock(firstRunLock); | 223 CriticalSection::Lock lock(firstRunLock); |
224 if (!firstRunActionTaken && filterEngine->IsFirstRun()) | 224 if (!firstRunActionExecuted && filterEngine->IsFirstRun()) |
225 { | 225 { |
226 response << true; | 226 response << true; |
227 firstRunActionTaken = true; | 227 firstRunActionExecuted = true; |
228 } | 228 } |
229 else | 229 else |
230 { | 230 { |
231 response << false; | 231 response << false; |
232 } | 232 } |
233 break; | 233 break; |
234 } | 234 } |
235 | 235 |
236 } | 236 } |
237 return response; | 237 return response; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
337 } | 337 } |
338 catch (std::runtime_error e) | 338 catch (std::runtime_error e) |
339 { | 339 { |
340 DebugException(e); | 340 DebugException(e); |
341 return 1; | 341 return 1; |
342 } | 342 } |
343 } | 343 } |
344 | 344 |
345 return 0; | 345 return 0; |
346 } | 346 } |
LEFT | RIGHT |