Bug 402610: Allow safebrowsing servers to specify separate URLs for chunk data. r=tony, blocking=beltzner
This commit is contained in:
@@ -75,8 +75,26 @@ function PROT_MalwareWarden() {
|
||||
var dbService_ = Cc["@mozilla.org/url-classifier/dbservice;1"]
|
||||
.getService(Ci.nsIUrlClassifierDBService);
|
||||
|
||||
dbService_.update(testUpdate);
|
||||
dbService_.finish(function(result) {}, function(error) {});
|
||||
var listener = {
|
||||
QueryInterface: function(iid)
|
||||
{
|
||||
if (iid.equals(Ci.nsISupports) ||
|
||||
iid.equals(Ci.nsIUrlClassifierUpdateObserver))
|
||||
return this;
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
updateUrlRequested: function(url) { },
|
||||
streamCompleted: function() { },
|
||||
updateError: function(errorCode) { },
|
||||
updateSuccess: function(requestedTimeout) { }
|
||||
};
|
||||
|
||||
dbService_.beginUpdate(listener);
|
||||
dbService_.beginStream();
|
||||
dbService_.updateStream(testUpdate);
|
||||
dbService_.finishStream();
|
||||
dbService_.finishUpdate();
|
||||
|
||||
G_Debug(this, "malwareWarden initialized");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user