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

Unified Diff: src/FilterEngine.cpp

Issue 11339006: GetAppLocale and GetDocumentationLink for IE faking (Closed)
Patch Set: Created Aug. 1, 2013, 7:36 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 | « include/AdblockPlus/FilterEngine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/FilterEngine.cpp
===================================================================
--- a/src/FilterEngine.cpp
+++ b/src/FilterEngine.cpp
@@ -277,3 +277,15 @@
std::string error(params.size() >= 1 && !params[0]->IsNull() ? params[0]->AsString() : "");
callback(error);
}
+
+std::string FilterEngine::GetAppLocale()
+{
+ JsValuePtr locale = jsEngine->Evaluate("require(\"utils\").Utils.appLocale");
+ return locale->AsString();
Wladimir Palant 2013/08/01 11:49:09 The app locale is being passed in by the host appl
+}
+
+std::string FilterEngine::GetDocumentationLink()
+{
+ JsValuePtr docLink = jsEngine->Evaluate("require(\"prefs\").Prefs.documentation_link");
+ return docLink->AsString();
Wladimir Palant 2013/08/01 11:49:09 There is already an API to get preferences, why no
+}
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld