| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 #include <AdblockPlus.h> | 1 #include <AdblockPlus.h> |
| 2 #include <functional> | 2 #include <functional> |
| 3 #include <vector> | 3 #include <vector> |
| 4 #include <thread> | 4 #include <thread> |
| 5 #include <Windows.h> | 5 #include <Windows.h> |
| 6 | 6 |
| 7 #include "../shared/AutoHandle.h" | 7 #include "../shared/AutoHandle.h" |
| 8 #include "../shared/Communication.h" | 8 #include "../shared/Communication.h" |
| 9 #include "../shared/Dictionary.h" | 9 #include "../shared/Dictionary.h" |
| 10 #include "../shared/Utils.h" | 10 #include "../shared/Utils.h" |
| 11 #include "../shared/Version.h" | 11 #include "../shared/Version.h" |
| 12 #include "../shared/CriticalSection.h" | 12 #include "../shared/CriticalSection.h" |
| 13 #include "../shared/IE_version.h" | |
| 13 #include "AdblockPlus.h" | 14 #include "AdblockPlus.h" |
| 14 #include "Debug.h" | 15 #include "Debug.h" |
| 15 #include "Updater.h" | 16 #include "Updater.h" |
| 16 | 17 |
| 17 namespace | 18 namespace |
| 18 { | 19 { |
| 19 std::auto_ptr<AdblockPlus::FilterEngine> filterEngine; | 20 std::auto_ptr<AdblockPlus::FilterEngine> filterEngine; |
| 20 std::auto_ptr<Updater> updater; | 21 std::auto_ptr<Updater> updater; |
| 21 int activeConnections = 0; | 22 int activeConnections = 0; |
| 22 CriticalSection activeConnectionsLock; | 23 CriticalSection activeConnectionsLock; |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 399 std::auto_ptr<AdblockPlus::FilterEngine> CreateFilterEngine(const std::wstring& locale) | 400 std::auto_ptr<AdblockPlus::FilterEngine> CreateFilterEngine(const std::wstring& locale) |
| 400 { | 401 { |
| 401 AdblockPlus::AppInfo appInfo; | 402 AdblockPlus::AppInfo appInfo; |
| 402 appInfo.version = ToUtf8String(IEPLUGIN_VERSION); | 403 appInfo.version = ToUtf8String(IEPLUGIN_VERSION); |
| 403 appInfo.name = "adblockplusie"; | 404 appInfo.name = "adblockplusie"; |
| 404 #ifdef _WIN64 | 405 #ifdef _WIN64 |
| 405 appInfo.application = "msie64"; | 406 appInfo.application = "msie64"; |
| 406 #else | 407 #else |
| 407 appInfo.application = "msie32"; | 408 appInfo.application = "msie32"; |
| 408 #endif | 409 #endif |
| 409 // TODO: Set applicationVersion parameter | 410 appInfo.applicationVersion = ToUtf8String(AdblockPlus::IE::installed_version_s tring()); |
|
sergei
2014/07/28 11:46:27
Why do we need it here? The engine should not know
sergei
2014/07/29 14:45:56
Still disagree here.
Why do we need the current so
Eric
2014/07/29 15:17:22
OK, but this is a code review, not an architecture
sergei
2014/07/30 13:49:21
I'm moving the discussion to intraforum.
https://i
| |
| 410 appInfo.locale = ToUtf8String(locale); | 411 appInfo.locale = ToUtf8String(locale); |
| 411 #ifdef ADBLOCK_PLUS_TEST_MODE | 412 #ifdef ADBLOCK_PLUS_TEST_MODE |
| 412 appInfo.developmentBuild = true; | 413 appInfo.developmentBuild = true; |
| 413 #else | 414 #else |
| 414 appInfo.developmentBuild = false; | 415 appInfo.developmentBuild = false; |
| 415 #endif | 416 #endif |
| 416 | 417 |
| 417 AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::New(appInfo); | 418 AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::New(appInfo); |
| 418 jsEngine->SetEventCallback("updateAvailable", &OnUpdateAvailable); | 419 jsEngine->SetEventCallback("updateAvailable", &OnUpdateAvailable); |
| 419 | 420 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 468 } | 469 } |
| 469 catch (const std::runtime_error& e) | 470 catch (const std::runtime_error& e) |
| 470 { | 471 { |
| 471 DebugException(e); | 472 DebugException(e); |
| 472 return 1; | 473 return 1; |
| 473 } | 474 } |
| 474 } | 475 } |
| 475 | 476 |
| 476 return 0; | 477 return 0; |
| 477 } | 478 } |
| OLD | NEW |