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

Unified Diff: components/safe_browsing_db/prefix_set.cc

Issue 1569673002: [NOT FOR LANDING] Detailed loading traces Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 months 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: components/safe_browsing_db/prefix_set.cc
diff --git a/components/safe_browsing_db/prefix_set.cc b/components/safe_browsing_db/prefix_set.cc
index ede92233ebf749402bca2135c20393762af03772..1cf6e0f9bfa03f01eab29174fb33c0832c2a071a 100644
--- a/components/safe_browsing_db/prefix_set.cc
+++ b/components/safe_browsing_db/prefix_set.cc
@@ -15,6 +15,7 @@
#include "base/md5.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
+#include "base/trace_event/trace_event.h"
namespace safe_browsing {
@@ -102,6 +103,7 @@ PrefixSet::PrefixSet(IndexVector* index,
PrefixSet::~PrefixSet() {}
bool PrefixSet::PrefixExists(SBPrefix prefix) const {
+ TRACE_EVENT0("toplevel", "PrefixSet::PrefixExists");
if (index_.empty())
return false;
@@ -134,10 +136,13 @@ bool PrefixSet::PrefixExists(SBPrefix prefix) const {
}
bool PrefixSet::Exists(const SBFullHash& hash) const {
+ TRACE_EVENT0("toplevel", "PrefixSet::Exists");
+
if (std::binary_search(full_hashes_.begin(), full_hashes_.end(),
hash, SBFullHashLess)) {
return true;
}
+ TRACE_EVENT0("toplevel", "PrefixSet::Exists::B");
return PrefixExists(hash.prefix);
}
« no previous file with comments | « components/content_settings/core/browser/cookie_settings.cc ('k') | components/safe_browsing_db/remote_database_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698