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

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

Issue 2669873002: [ImportantSites] Implementing dialog level blacklisting and blacklist expiration (Closed)
Patch Set: android compile Created 3 years, 10 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 #ifndef CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_ 5 #ifndef CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_
6 #define CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_ 6 #define CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 class Profile; 14 class Profile;
15 15
16 namespace user_prefs {
17 class PrefRegistrySyncable;
18 }
19
16 class ImportantSitesUtil { 20 class ImportantSitesUtil {
17 public: 21 public:
18 struct ImportantDomainInfo { 22 struct ImportantDomainInfo {
19 std::string registerable_domain; 23 std::string registerable_domain;
20 GURL example_origin; 24 GURL example_origin;
21 double engagement_score = 0; 25 double engagement_score = 0;
22 int32_t reason_bitfield = 0; 26 int32_t reason_bitfield = 0;
23 }; 27 };
24 28
29 static bool IsDialogDisabled(Profile* profile);
30
31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
32
25 // This returns the top |<=max_results| important registrable domains. This 33 // This returns the top |<=max_results| important registrable domains. This
26 // uses site engagement and notifications to generate the list. |max_results| 34 // uses site engagement and notifications to generate the list. |max_results|
27 // is assumed to be small. 35 // is assumed to be small.
28 // See net/base/registry_controlled_domains/registry_controlled_domain.h for 36 // See net/base/registry_controlled_domains/registry_controlled_domain.h for
29 // more details on registrable domains and the current list of effective 37 // more details on registrable domains and the current list of effective
30 // eTLDs. 38 // eTLDs.
31 static std::vector<ImportantDomainInfo> GetImportantRegisterableDomains( 39 static std::vector<ImportantDomainInfo> GetImportantRegisterableDomains(
32 Profile* profile, 40 Profile* profile,
33 size_t max_results); 41 size_t max_results);
34 42
(...skipping 14 matching lines...) Expand all
49 // the score requirements for the Site Engagement Service, so ONLY call for 57 // the score requirements for the Site Engagement Service, so ONLY call for
50 // testing. 58 // testing.
51 static void MarkOriginAsImportantForTesting(Profile* profile, 59 static void MarkOriginAsImportantForTesting(Profile* profile,
52 const GURL& origin); 60 const GURL& origin);
53 61
54 private: 62 private:
55 DISALLOW_IMPLICIT_CONSTRUCTORS(ImportantSitesUtil); 63 DISALLOW_IMPLICIT_CONSTRUCTORS(ImportantSitesUtil);
56 }; 64 };
57 65
58 #endif // CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_ 66 #endif // CHROME_BROWSER_ENGAGEMENT_IMPORTANT_SITES_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/preferences/pref_service_bridge.cc ('k') | chrome/browser/engagement/important_sites_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698