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

Side by Side Diff: chrome/browser/engagement/important_sites_util.cc

Issue 2393103002: [Durable] Updated Durable heuristic to use 'important sites' (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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/android/preferences/important_sites_util.h" 5 #include <chrome/browser/engagement/important_sites_util.h>
michaeln 2016/10/05 23:27:45 is there a reason to use <>'s, if no please use ""
dmurph 2016/10/06 01:01:59 Done.
6
7 #include <algorithm> 6 #include <algorithm>
8 #include <map> 7 #include <map>
9 #include <memory> 8 #include <memory>
10 #include <set> 9 #include <set>
11 #include <utility> 10 #include <utility>
12 11
13 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
14 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
15 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
16 #include "base/stl_util.h" 15 #include "base/stl_util.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 void ImportantSitesUtil::MarkOriginAsImportantForTesting(Profile* profile, 430 void ImportantSitesUtil::MarkOriginAsImportantForTesting(Profile* profile,
432 const GURL& origin) { 431 const GURL& origin) {
433 // First get data from site engagement. 432 // First get data from site engagement.
434 SiteEngagementService* site_engagement_service = 433 SiteEngagementService* site_engagement_service =
435 SiteEngagementService::Get(profile); 434 SiteEngagementService::Get(profile);
436 site_engagement_service->ResetScoreForURL( 435 site_engagement_service->ResetScoreForURL(
437 origin, SiteEngagementScore::GetMediumEngagementBoundary()); 436 origin, SiteEngagementScore::GetMediumEngagementBoundary());
438 DCHECK(site_engagement_service->IsEngagementAtLeast( 437 DCHECK(site_engagement_service->IsEngagementAtLeast(
439 origin, SiteEngagementService::ENGAGEMENT_LEVEL_MEDIUM)); 438 origin, SiteEngagementService::ENGAGEMENT_LEVEL_MEDIUM));
440 } 439 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698