Bug 402610: Allow safebrowsing servers to specify separate URLs for chunk data. r=tony, blocking=beltzner

This commit is contained in:
2008-01-12 14:22:03 -08:00
parent 5016da914e
commit 7037976249
11 changed files with 828 additions and 433 deletions

View File

@@ -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");
}