| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 jsEngine->SetEventCallback(eventName, std::tr1::bind(&FilterEngine::UpdateChec
kDone, | 264 jsEngine->SetEventCallback(eventName, std::tr1::bind(&FilterEngine::UpdateChec
kDone, |
| 265 this, eventName, callback, std::tr1::placeholders::_1)); | 265 this, eventName, callback, std::tr1::placeholders::_1)); |
| 266 | 266 |
| 267 JsValuePtr func = jsEngine->Evaluate("API.forceUpdateCheck"); | 267 JsValuePtr func = jsEngine->Evaluate("API.forceUpdateCheck"); |
| 268 JsValueList params; | 268 JsValueList params; |
| 269 params.push_back(jsEngine->NewValue(eventName)); | 269 params.push_back(jsEngine->NewValue(eventName)); |
| 270 func->Call(params); | 270 func->Call(params); |
| 271 } | 271 } |
| 272 | 272 |
| 273 void FilterEngine::UpdateCheckDone(std::string eventName, FilterEngine::UpdaterC
allback callback, JsValueList& params) | 273 void FilterEngine::UpdateCheckDone(const std::string& eventName, FilterEngine::U
pdaterCallback callback, JsValueList& params) |
| 274 { | 274 { |
| 275 jsEngine->RemoveEventCallback(eventName); | 275 jsEngine->RemoveEventCallback(eventName); |
| 276 | 276 |
| 277 std::string error(params.size() >= 1 && !params[0]->IsNull() ? params[0]->AsSt
ring() : ""); | 277 std::string error(params.size() >= 1 && !params[0]->IsNull() ? params[0]->AsSt
ring() : ""); |
| 278 callback(error); | 278 callback(error); |
| 279 } | 279 } |
| LEFT | RIGHT |