Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_store.cc

Issue 60013005: Remove safe-browsing false-positive tracking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_store.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_store.cc b/chrome/browser/safe_browsing/safe_browsing_store.cc
index 0d3f5595a61e8dadc950f90eca87c04f2bf10994..2638e581bfeeb93281a666a1c9486b1f2a58676c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store.cc
@@ -6,7 +6,7 @@
#include <algorithm>
-#include "base/metrics/histogram.h"
+#include "base/logging.h"
namespace {
@@ -120,50 +120,8 @@ void RemoveDeleted(ItemsT* items, const base::hash_set<int32>& del_set) {
items->erase(end_iter, items->end());
}
-enum MissTypes {
- MISS_TYPE_ALL,
- MISS_TYPE_FALSE,
-
- // Always at the end.
- MISS_TYPE_MAX
-};
-
} // namespace
-void SBCheckPrefixMisses(const SBAddPrefixes& add_prefixes,
- const std::set<SBPrefix>& prefix_misses) {
- if (prefix_misses.empty())
- return;
-
- // Record a hit for all prefixes which missed when sent to the
- // server.
- for (size_t i = 0; i < prefix_misses.size(); ++i) {
- UMA_HISTOGRAM_ENUMERATION("SB2.BloomFilterFalsePositives",
- MISS_TYPE_ALL, MISS_TYPE_MAX);
- }
-
- // Collect the misses which are not present in |add_prefixes|.
- // Since |add_prefixes| can contain multiple copies of the same
- // prefix, it is not sufficient to count the number of elements
- // present in both collections.
- std::set<SBPrefix> false_misses(prefix_misses.begin(), prefix_misses.end());
- for (SBAddPrefixes::const_iterator iter = add_prefixes.begin();
- iter != add_prefixes.end(); ++iter) {
- // |erase()| on an absent element should cost like |find()|.
- false_misses.erase(iter->prefix);
- }
-
- // Record a hit for prefixes which we shouldn't have sent in the
- // first place.
- for (size_t i = 0; i < false_misses.size(); ++i) {
- UMA_HISTOGRAM_ENUMERATION("SB2.BloomFilterFalsePositives",
- MISS_TYPE_FALSE, MISS_TYPE_MAX);
- }
-
- // Divide |MISS_TYPE_FALSE| by |MISS_TYPE_ALL| to get the
- // bloom-filter false-positive rate.
-}
-
void SBProcessSubs(SBAddPrefixes* add_prefixes,
SBSubPrefixes* sub_prefixes,
std::vector<SBAddFullHash>* add_full_hashes,
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_store.h ('k') | chrome/browser/safe_browsing/safe_browsing_store_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698