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

Unified Diff: src/FilterEngine.cpp

Issue 4899447913840640: Issue 1106 - Add currentVersion Pref and compareVersions API (Closed)
Patch Set: Created Aug. 1, 2014, 12:51 p.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 | « lib/prefs.js ('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
@@ -334,3 +334,12 @@
JsValuePtr item(params.size() >= 2 ? params[1] : jsEngine->NewValue(false));
callback(action, item);
}
+
+int FilterEngine::CompareVersions(const std::string& v1, const std::string& v2)
+{
+ JsValueList params;
+ params.push_back(jsEngine->NewValue(v1));
+ params.push_back(jsEngine->NewValue(v2));
+ JsValuePtr func = jsEngine->Evaluate("API.compareVersions");
+ return func->Call(params)->AsInt();
+}
« no previous file with comments | « lib/prefs.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld