| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 request >> name; | 190 request >> name; |
| 191 | 191 |
| 192 AdblockPlus::JsValuePtr valuePtr = filterEngine->GetPref(name); | 192 AdblockPlus::JsValuePtr valuePtr = filterEngine->GetPref(name); |
| 193 if (valuePtr->IsNull() || valuePtr->IsUndefined()) | 193 if (valuePtr->IsNull() || valuePtr->IsUndefined()) |
| 194 { | 194 { |
| 195 // Report no success | 195 // Report no success |
| 196 response << false; | 196 response << false; |
| 197 break; | 197 break; |
| 198 } | 198 } |
| 199 | 199 |
| 200 // Report success | |
| 201 response << true; | |
| 202 | 200 |
| 203 if (valuePtr->IsBool()) | 201 if (valuePtr->IsBool()) |
| 204 { | 202 { |
| 203 response << true; |
| 205 response << valuePtr->AsBool(); | 204 response << valuePtr->AsBool(); |
| 206 } | 205 } |
| 207 else if (valuePtr->IsNumber()) | 206 else if (valuePtr->IsNumber()) |
| 208 { | 207 { |
| 208 response << true; |
| 209 response << valuePtr->AsInt(); | 209 response << valuePtr->AsInt(); |
| 210 } | 210 } |
| 211 else if (valuePtr->IsString()) | 211 else if (valuePtr->IsString()) |
| 212 { | 212 { |
| 213 response << true; |
| 213 response << valuePtr->AsString(); | 214 response << valuePtr->AsString(); |
| 215 } |
| 216 else |
| 217 { |
| 218 // Report failure |
| 219 response << false; |
| 214 } | 220 } |
| 215 break; | 221 break; |
| 216 } | 222 } |
| 217 | 223 |
| 218 } | 224 } |
| 219 return response; | 225 return response; |
| 220 } | 226 } |
| 221 | 227 |
| 222 DWORD WINAPI ClientThread(LPVOID param) | 228 DWORD WINAPI ClientThread(LPVOID param) |
| 223 { | 229 { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 } | 325 } |
| 320 catch (std::runtime_error e) | 326 catch (std::runtime_error e) |
| 321 { | 327 { |
| 322 DebugException(e); | 328 DebugException(e); |
| 323 return 1; | 329 return 1; |
| 324 } | 330 } |
| 325 } | 331 } |
| 326 | 332 |
| 327 return 0; | 333 return 0; |
| 328 } | 334 } |
| LEFT | RIGHT |