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

Unified Diff: lib/filterStorage.js

Issue 29336735: Issue 394 - hit statistics tool data collection (core) (Closed)
Patch Set: Created Feb. 19, 2016, 5:26 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/filterListener.js ('K') | « lib/filterListener.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterStorage.js
===================================================================
--- a/lib/filterStorage.js
+++ b/lib/filterStorage.js
@@ -29,6 +29,7 @@
let {Subscription, SpecialSubscription, ExternalSubscription} = require("subscriptionClasses");
let {FilterNotifier} = require("filterNotifier");
let {Utils} = require("utils");
+let {FilterHits} = require("filterHits");
Wladimir Palant 2016/02/29 14:40:30 Same here, you cannot expect this module to be pre
saroyanm 2016/03/18 18:24:47 Done.
/**
* Version number of the filter storage file format.
@@ -323,14 +324,17 @@
/**
* Increases the hit count for a filter by one
* @param {Filter} filter
+ * @param {String} hostname of top window where the match originated in
*/
- increaseHitCount: function(filter)
+ increaseHitCount: function(filter, hostname)
{
if (!Prefs.savestats || !(filter instanceof ActiveFilter))
return;
filter.hitCount++;
filter.lastHit = Date.now();
+ if (Prefs.sendstats)
saroyanm 2016/02/19 18:31:35 Hmm, I think it's make sense to check if the modul
Wladimir Palant 2016/02/29 14:40:31 Currently that module has too much Firefox-specifi
+ FilterHits.increaseFilterHits(filter, hostname);
},
/**
« lib/filterListener.js ('K') | « lib/filterListener.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld