OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/engagement/important_sites_util.h" | 5 #include "chrome/browser/engagement/important_sites_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 CROSSED_REASON_BOUNDARY); | 476 CROSSED_REASON_BOUNDARY); |
477 } | 477 } |
478 } | 478 } |
479 | 479 |
480 void ImportantSitesUtil::MarkOriginAsImportantForTesting(Profile* profile, | 480 void ImportantSitesUtil::MarkOriginAsImportantForTesting(Profile* profile, |
481 const GURL& origin) { | 481 const GURL& origin) { |
482 SiteEngagementScore::SetParamValuesForTesting(); | 482 SiteEngagementScore::SetParamValuesForTesting(); |
483 // First get data from site engagement. | 483 // First get data from site engagement. |
484 SiteEngagementService* site_engagement_service = | 484 SiteEngagementService* site_engagement_service = |
485 SiteEngagementService::Get(profile); | 485 SiteEngagementService::Get(profile); |
486 site_engagement_service->ResetScoreForURL( | 486 site_engagement_service->ResetBaseScoreForURL( |
487 origin, SiteEngagementScore::GetMediumEngagementBoundary()); | 487 origin, SiteEngagementScore::GetMediumEngagementBoundary()); |
488 DCHECK(site_engagement_service->IsEngagementAtLeast( | 488 DCHECK(site_engagement_service->IsEngagementAtLeast( |
489 origin, blink::mojom::EngagementLevel::MEDIUM)); | 489 origin, blink::mojom::EngagementLevel::MEDIUM)); |
490 } | 490 } |
OLD | NEW |