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

Unified Diff: lib/api.js

Issue 10800079: Implemented update checking functionality (Closed)
Patch Set: Created June 5, 2013, 6:47 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 | « include/AdblockPlus/FilterEngine.h ('k') | lib/prefs.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/api.js
===================================================================
--- a/lib/api.js
+++ b/lib/api.js
@@ -20,16 +20,17 @@ var API = (function()
var Filter = require("filterClasses").Filter;
var Subscription = require("subscriptionClasses").Subscription;
var SpecialSubscription = require("subscriptionClasses").SpecialSubscription;
var FilterStorage = require("filterStorage").FilterStorage;
var defaultMatcher = require("matcher").defaultMatcher;
var ElemHide = require("elemHide").ElemHide;
var Synchronizer = require("synchronizer").Synchronizer;
var Prefs = require("prefs").Prefs;
+ var checkForUpdates = require("updater").checkForUpdates;
return {
getFilterFromText: function(text)
{
text = Filter.normalize(text);
if (!text)
throw "Attempted to create a filter from empty text";
return Filter.fromText(text);
@@ -151,11 +152,16 @@ var API = (function()
getPref: function(pref)
{
return Prefs[pref];
},
setPref: function(pref, value)
{
Prefs[pref] = value;
+ },
+
+ forceUpdateCheck: function(eventName)
+ {
+ checkForUpdates(true, _triggerEvent.bind(null, eventName));
}
};
})();
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | lib/prefs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld