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

Unified Diff: lib/notification.js

Issue 29321478: Issue 2738 - Make RegExpFilter.matches() take a bit mask instead of content type string (Closed)
Patch Set: Created July 9, 2015, 1:45 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
« lib/filterClasses.js ('K') | « lib/matcher.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/notification.js
diff --git a/lib/notification.js b/lib/notification.js
index 0c80f785c2e0734212cbef1538d5a95b3aeb557d..e5de4b0ca1ad8ebc2a0ccbec88ba62c53d09b76b 100644
--- a/lib/notification.js
+++ b/lib/notification.js
@@ -25,7 +25,7 @@ let {Prefs} = require("prefs");
let {Downloader, Downloadable, MILLIS_IN_MINUTE, MILLIS_IN_HOUR, MILLIS_IN_DAY} = require("downloader");
let {Utils} = require("utils");
let {Matcher} = require("matcher");
-let {Filter} = require("filterClasses");
+let {Filter, RegExpFilter} = require("filterClasses");
let INITIAL_DELAY = 1 * MILLIS_IN_MINUTE;
let CHECK_INTERVAL = 1 * MILLIS_IN_HOUR;
@@ -222,7 +222,7 @@ let Notification = exports.Notification =
let matcher = new Matcher();
for (let urlFilter of notification.urlFilters)
matcher.add(Filter.fromText(urlFilter));
- if (!matcher.matchesAny(url, "DOCUMENT", url))
+ if (!matcher.matchesAny(url, RegExpFilter.toTypeMask("DOCUMENT"), url))
continue;
}
else
« lib/filterClasses.js ('K') | « lib/matcher.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld