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

Unified Diff: lib/filterStorage.js

Issue 6337686776315904: Issue 394 - hit statistics tool data collection (Closed)
Patch Set: Created Feb. 17, 2015, 4:34 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
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");
/**
* Version number of the filter storage file format.
@@ -336,6 +337,8 @@
filter.hitCount++;
filter.lastHit = Date.now();
saroyanm 2015/02/17 17:05:51 @Dave here is where we are setting the lastHit for
+ if (Prefs.sendstats)
+ FilterHits.increaseFilterHits(filter, wnd);
Thomas Greiner 2015/02/23 18:43:05 `FilterNotifier` allows you to listen to the "filt
saroyanm 2015/02/28 15:24:30 I also need the window object where the match has
Thomas Greiner 2015/03/06 11:29:19 Ah, right. We also cannot add it to the `FilterNot
},
/**
@@ -443,7 +446,9 @@
if (sourceFile != this.sourceFile)
this.saveToDisk();
-
+
+ if (Prefs.sendstats)
+ FilterHits.loadFilterHitsFromDatabase();
Thomas Greiner 2015/02/23 18:43:05 `FilterNotifier` allows you to listen to the "load
saroyanm 2015/02/28 15:24:30 Good point, done.
}.bind(this);
let explicitFile;

Powered by Google App Engine
This is Rietveld