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

Unified Diff: chrome/browser/engagement/site_engagement_service.cc

Issue 2002443002: Bail out of resetting a URL's engagement if the URL is not valid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/engagement/site_engagement_service.cc
diff --git a/chrome/browser/engagement/site_engagement_service.cc b/chrome/browser/engagement/site_engagement_service.cc
index fa8f699fa73d44699dceb25ff8fd40be2f399503..3d88eaba661ebfea12a1b66a50108843de37db0b 100644
--- a/chrome/browser/engagement/site_engagement_service.cc
+++ b/chrome/browser/engagement/site_engagement_service.cc
@@ -505,7 +505,11 @@ void SiteEngagementService::GetCountsAndLastVisitForOriginsComplete(
void SiteEngagementService::ResetScoreAndAccessTimesForURL(
const GURL& url, double score, const base::Time* updated_time) {
- DCHECK(url.is_valid());
+ // It appears that the history service occassionally sends bad URLs to us.
+ // See crbug.com/612881.
+ if (!url.is_valid())
+ return;
+
DCHECK_GE(score, 0);
DCHECK_LE(score, SiteEngagementScore::kMaxPoints);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698