Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/engine/Main.cpp

Issue 11443041: Update libadblockplus (Closed)
Patch Set: Created Aug. 13, 2013, 11:39 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « .hgsubstate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/engine/Main.cpp
===================================================================
--- a/src/engine/Main.cpp
+++ b/src/engine/Main.cpp
@@ -37,17 +37,17 @@ namespace
{
AdblockPlus::SubscriptionPtr subscription = subscriptions[i];
response << subscription->GetProperty("url")->AsString()
<< subscription->GetProperty("title")->AsString()
<< subscription->GetProperty("specialization")->AsString()
<< subscription->IsListed();
}
}
-
+
bool updateAvailable;
void UpdateCallback(const std::string res)
{
if (updateAvailable)
return;
Dictionary* dictionary = Dictionary::GetInstance();
if (res.length() == 0)
{
@@ -175,45 +175,45 @@ namespace
case Communication::PROC_SET_PREF:
{
std::string prefName;
request >> prefName;
Communication::ValueType valueType = request.GetType();
switch (valueType)
{
- case Communication::TYPE_STRING:
- {
- std::string prefValue;
- request >> prefValue;
+ case Communication::TYPE_STRING:
+ {
+ std::string prefValue;
+ request >> prefValue;
filterEngine->SetPref(prefName, filterEngine->GetJsEngine()->NewValue(prefValue));
- break;
- }
- case Communication::TYPE_INT64:
- {
- int64_t prefValue;
- request >> prefValue;
+ break;
+ }
+ case Communication::TYPE_INT64:
+ {
+ int64_t prefValue;
+ request >> prefValue;
filterEngine->SetPref(prefName, filterEngine->GetJsEngine()->NewValue(prefValue));
- break;
- }
- case Communication::TYPE_INT32:
- {
- int prefValue;
- request >> prefValue;
+ break;
+ }
+ case Communication::TYPE_INT32:
+ {
+ int prefValue;
+ request >> prefValue;
filterEngine->SetPref(prefName, filterEngine->GetJsEngine()->NewValue(prefValue));
- break;
- }
- case Communication::TYPE_BOOL:
- {
- bool prefValue;
- request >> prefValue;
+ break;
+ }
+ case Communication::TYPE_BOOL:
+ {
+ bool prefValue;
+ request >> prefValue;
filterEngine->SetPref(prefName, filterEngine->GetJsEngine()->NewValue(prefValue));
- break;
- }
- default:
+ break;
+ }
+ default:
break;
}
break;
}
case Communication::PROC_GET_PREF:
{
std::string name;
request >> name;
@@ -336,20 +336,21 @@ namespace
}
std::auto_ptr<AdblockPlus::FilterEngine> CreateFilterEngine(const std::wstring& locale)
{
AdblockPlus::AppInfo appInfo;
appInfo.version = ToUtf8String(IEPLUGIN_VERSION);
appInfo.name = "adblockplusie";
#ifdef _WIN64
- appInfo.platform = "msie64";
+ appInfo.application = "msie64";
#else
- appInfo.platform = "msie32";
+ appInfo.application = "msie32";
#endif
+ // TODO: Set applicationVersion parameter
appInfo.locale = ToUtf8String(locale);
#ifdef ADBLOCK_PLUS_TEST_MODE
appInfo.developmentBuild = true;
#else
appInfo.developmentBuild = false;
#endif
AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::New(appInfo);
« no previous file with comments | « .hgsubstate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld