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

Unified Diff: src/FilterEngine.cpp

Issue 5739415347396608: Expose extractHostFromURL to API (Closed)
Patch Set: Created April 22, 2014, 7: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 | « lib/api.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
@@ -286,6 +286,15 @@
func->Call(params);
}
+std::string FilterEngine::GetHostFromURL(const std::string& url)
+{
+ JsValuePtr func = jsEngine->Evaluate("API.getHostFromUrl");
+ JsValueList params;
+ params.push_back(jsEngine->NewValue(url));
+ return func->Call(params)->AsString();
+}
+
+
void FilterEngine::ForceUpdateCheck(FilterEngine::UpdaterCallback callback)
{
std::string eventName = "updateCheckDone";
« no previous file with comments | « lib/api.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld