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

Unified Diff: lib/filterListener.js

Issue 6337686776315904: Issue 394 - hit statistics tool data collection (Closed)
Patch Set: Addressed Dave Comments and updated increaseFilterHits parameter Created April 16, 2015, 10:36 a.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/filterHits.js ('k') | lib/filterStorage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterListener.js
===================================================================
--- a/lib/filterListener.js
+++ b/lib/filterListener.js
@@ -28,6 +28,7 @@
let {defaultMatcher} = require("matcher");
let {ActiveFilter, RegExpFilter, ElemHideBase} = require("filterClasses");
let {Prefs} = require("prefs");
+let {FilterHits} = require("filterHits");
/**
* Value of the FilterListener.batchMode property.
@@ -74,7 +75,11 @@
else
isDirty += factor;
if (isDirty >= 1)
+ {
FilterStorage.saveToDisk();
+ if (Prefs.sendstats)
+ FilterHits.saveFilterHitsToDatabase();
+ }
}
};
@@ -89,6 +94,7 @@
if (topic == "browser:purge-session-history" && Prefs.clearStatsOnHistoryPurge)
{
FilterStorage.resetHitCounts();
+ FilterHits.resetFilterHits();
FilterListener.setDirty(0); // Force saving to disk
Prefs.recentReports = [];
« no previous file with comments | « lib/filterHits.js ('k') | lib/filterStorage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld