Commit a72d6b89 authored by Eric Seckler's avatar Eric Seckler Committed by Commit Bot

VisitedLinkMaster: Add trace events to AddURL(s)

To enable us to judge the impact of crbug.com/1019181.

Bug: 1019181
Change-Id: Iff85c850d61f10f4b5dfbfb6d996a050e99fd806
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1901469
Auto-Submit: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713213}
parent a7313f80
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "components/visitedlink/browser/visitedlink_delegate.h" #include "components/visitedlink/browser/visitedlink_delegate.h"
#include "components/visitedlink/browser/visitedlink_event_listener.h" #include "components/visitedlink/browser/visitedlink_event_listener.h"
...@@ -339,6 +340,7 @@ void VisitedLinkMaster::PostIOTask(const base::Location& from_here, ...@@ -339,6 +340,7 @@ void VisitedLinkMaster::PostIOTask(const base::Location& from_here,
} }
void VisitedLinkMaster::AddURL(const GURL& url) { void VisitedLinkMaster::AddURL(const GURL& url) {
TRACE_EVENT0("browser", "VisitedLinkMaster::AddURL");
Hash index = TryToAddURL(url); Hash index = TryToAddURL(url);
if (!table_builder_ && !table_is_loading_from_file_ && index != null_hash_) { if (!table_builder_ && !table_is_loading_from_file_ && index != null_hash_) {
// Not rebuilding, so we want to keep the file on disk up to date. // Not rebuilding, so we want to keep the file on disk up to date.
...@@ -351,6 +353,7 @@ void VisitedLinkMaster::AddURL(const GURL& url) { ...@@ -351,6 +353,7 @@ void VisitedLinkMaster::AddURL(const GURL& url) {
} }
void VisitedLinkMaster::AddURLs(const std::vector<GURL>& urls) { void VisitedLinkMaster::AddURLs(const std::vector<GURL>& urls) {
TRACE_EVENT0("browser", "VisitedLinkMaster::AddURLs");
for (const GURL& url : urls) { for (const GURL& url : urls) {
Hash index = TryToAddURL(url); Hash index = TryToAddURL(url);
if (!table_builder_ && !table_is_loading_from_file_ && index != null_hash_) if (!table_builder_ && !table_is_loading_from_file_ && index != null_hash_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment