Commit dc43c533 authored by Varun Khaneja's avatar Varun Khaneja Committed by Commit Bot

Fix the tracking events for CheckUrl

Bug: 1004470

Change-Id: Iddc66a93a9102b4b514dbb7236846c22ce3d5e76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062718
Auto-Submit: Varun Khaneja <vakh@chromium.org>
Commit-Queue: Bettina Dea <bdea@chromium.org>
Reviewed-by: default avatarBettina Dea <bdea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742731}
parent aaa87cea
...@@ -121,9 +121,9 @@ SafeBrowsingUrlCheckerImpl::~SafeBrowsingUrlCheckerImpl() { ...@@ -121,9 +121,9 @@ SafeBrowsingUrlCheckerImpl::~SafeBrowsingUrlCheckerImpl() {
if (state_ == STATE_CHECKING_URL) { if (state_ == STATE_CHECKING_URL) {
database_manager_->CancelCheck(this); database_manager_->CancelCheck(this);
const GURL& url = urls_[next_index_].url;
TRACE_EVENT_ASYNC_END1("safe_browsing", "CheckUrl", this, "result", TRACE_EVENT_ASYNC_END1("safe_browsing", "CheckUrl", this, "url",
"request_canceled"); url.spec());
} }
} }
...@@ -156,9 +156,7 @@ void SafeBrowsingUrlCheckerImpl::OnUrlResult(const GURL& url, ...@@ -156,9 +156,7 @@ void SafeBrowsingUrlCheckerImpl::OnUrlResult(const GURL& url,
timer_.Stop(); timer_.Stop();
RecordCheckUrlTimeout(/*timed_out=*/false); RecordCheckUrlTimeout(/*timed_out=*/false);
TRACE_EVENT_ASYNC_END1( TRACE_EVENT_ASYNC_END1("safe_browsing", "CheckUrl", this, "url", url.spec());
"safe_browsing", "CheckUrl", this, "result",
threat_type == SB_THREAT_TYPE_SAFE ? "safe" : "unsafe");
if (threat_type == SB_THREAT_TYPE_SAFE || if (threat_type == SB_THREAT_TYPE_SAFE ||
threat_type == SB_THREAT_TYPE_SUSPICIOUS_SITE) { threat_type == SB_THREAT_TYPE_SUSPICIOUS_SITE) {
...@@ -348,6 +346,9 @@ void SafeBrowsingUrlCheckerImpl::ProcessUrls() { ...@@ -348,6 +346,9 @@ void SafeBrowsingUrlCheckerImpl::ProcessUrls() {
timer_.Stop(); timer_.Stop();
RecordCheckUrlTimeout(/*timed_out=*/false); RecordCheckUrlTimeout(/*timed_out=*/false);
TRACE_EVENT_ASYNC_END1("safe_browsing", "CheckUrl", this, "url",
url.spec());
if (!RunNextCallback(true, false)) if (!RunNextCallback(true, false))
return; return;
......
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