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: subscriptions and thirdparty filter hit added to statistics Created April 9, 2014, 4:36 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 | « lib/filterListener.js ('k') | lib/ui.js » ('j') | 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
@@ -30,6 +30,7 @@
let {FilterNotifier} = require("filterNotifier");
let {Utils} = require("utils");
let {TimeLine} = require("timeline");
+let {FilterHits} = require("filterHits");
/**
* Version number of the filter storage file format.
@@ -333,6 +334,8 @@
filter.hitCount++;
filter.lastHit = Date.now();
+ if (Prefs.sendstats)
+ FilterHits.increaseFilterHits(filter, wnd);
},
/**
@@ -448,7 +451,9 @@
if (sourceFile != this.sourceFile)
this.saveToDisk();
-
+
+ if (Prefs.sendstats)
+ FilterHits.loadFilterHitsFromDisk();
TimeLine.leave("FilterStorage.loadFromDisk() read callback done");
}.bind(this);
« no previous file with comments | « lib/filterListener.js ('k') | lib/ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld