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

Side by Side Diff: lib/client.js

Issue 8492018: abpcrawler: Collect unmatched filters (Closed)
Patch Set: Created Oct. 2, 2012, 5:01 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/crawler.js » ('j') | lib/crawler.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function get(url, callback) 1 function get(url, callback)
2 { 2 {
3 let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"] 3 let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
4 .createInstance(Ci.nsIXMLHttpRequest); 4 .createInstance(Ci.nsIXMLHttpRequest);
5 request.mozBackgroundRequest = true; 5 request.mozBackgroundRequest = true;
6 request.open("GET", url); 6 request.open("GET", url);
7 if (callback) 7 if (callback)
8 request.addEventListener("load", callback.bind(undefined, request)); 8 request.addEventListener("load", callback.bind(undefined, request));
9 request.send(); 9 request.send();
10 } 10 }
(...skipping 17 matching lines...) Expand all
28 28
29 Client.fetchCrawlableSites = function(backendUrl, callback) 29 Client.fetchCrawlableSites = function(backendUrl, callback)
30 { 30 {
31 get(backendUrl + "/crawlableSites", function(request) 31 get(backendUrl + "/crawlableSites", function(request)
32 { 32 {
33 let sites = request.responseText.trim().split("\n"); 33 let sites = request.responseText.trim().split("\n");
34 callback(sites); 34 callback(sites);
35 }); 35 });
36 }; 36 };
37 37
38 Client.sendCrawlerDataFile = function(backendUrl, dataFilePath, callback) 38 Client.sendRequestsFile = function(backendUrl, requestsFilePath, callback)
39 { 39 {
40 postFile(backendUrl + "/crawlerData", dataFilePath, callback); 40 postFile(backendUrl + "/crawlerRequests", requestsFilePath, callback);
41 }; 41 };
OLDNEW
« no previous file with comments | « no previous file | lib/crawler.js » ('j') | lib/crawler.js » ('J')

Powered by Google App Engine
This is Rietveld