File: safety_hub_prefs.h

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (85 lines) | stat: -rw-r--r-- 3,641 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_SAFETY_HUB_SAFETY_HUB_PREFS_H_
#define CHROME_BROWSER_UI_SAFETY_HUB_SAFETY_HUB_PREFS_H_

#include "build/build_config.h"

class PrefRegistrySimple;

namespace safety_hub_prefs {

#if !BUILDFLAG(IS_ANDROID)
// Dictionary that determines the next time SafetyHub will trigger a background
// password check.
inline constexpr char kBackgroundPasswordCheckTimeAndInterval[] =
    "profile.background_password_check";

// Keys used inside the `kBackgroundPasswordCheckTimeAndInterval` pref dict.
inline constexpr char kNextPasswordCheckTimeKey[] = "next_check_time";
inline constexpr char kPasswordCheckIntervalKey[] = "check_interval";
inline constexpr char kPasswordCheckMonWeight[] = "check_mon_weight";
inline constexpr char kPasswordCheckTueWeight[] = "check_tue_weight";
inline constexpr char kPasswordCheckWedWeight[] = "check_wed_weight";
inline constexpr char kPasswordCheckThuWeight[] = "check_thu_weight";
inline constexpr char kPasswordCheckFriWeight[] = "check_fri_weight";
inline constexpr char kPasswordCheckSatWeight[] = "check_sat_weight";
inline constexpr char kPasswordCheckSunWeight[] = "check_sun_weight";

#else   // BUILDFLAG(IS_ANDROID)

// An integer count of how many account-level weak credentials were detected by
// GMSCore.
inline constexpr char kWeakCredentialsCount[] =
    "profile.safety_hub_weak_credentials_count";

// An integer count of how many account-level reused credentials were detected
// by GMSCore.
inline constexpr char kReusedCredentialsCount[] =
    "profile.safety_hub_reused_credentials_count";

// An integer count of how many local-level breached credentials were detected
// by GMSCore.
inline constexpr char kLocalBreachedCredentialsCount[] =
    "profile.safety_hub_local_breached_credentials_count";

// An integer count of how many local-level weak credentials were detected by
// GMSCore.
inline constexpr char kLocalWeakCredentialsCount[] =
    "profile.safety_hub_local_weak_credentials_count";

// An integer count of how many local-level reused credentials were detected
// by GMSCore.
inline constexpr char kLocalReusedCredentialsCount[] =
    "profile.safety_hub_reused_local_credentials_count";

// A long that represents the last time in milliseconds that a check for
// local-level credentials was triggered in GMSCore by Chrome.
inline constexpr char kLastTimeInMsLocalPasswordCheckCompleted[] =
    "profile.safety_hub_last_time_in_ms_local_password_check_completed";
#endif  // !BUILDFLAG(IS_ANDROID)

// Dictionary that holds the notifications in the three-dot menu and their
// associated results.
inline const char kMenuNotificationsPrefsKey[] =
    "profile.safety_hub_menu_notifications";

// Boolean that specifies whether or not unused site permissions should be
// revoked by Safety Hub. It is used only when kSafetyHub flag is on.
// Conditioned because currently Safety Hub is available only on desktop and
// Android.
inline const char kUnusedSitePermissionsRevocationEnabled[] =
    "safety_hub.unused_site_permissions_revocation.enabled";

// Boolean that indicates whether the revoked permissions have successfully
// migrated to use string key values instead of integer key values.
inline const char kUnusedSitePermissionsRevocationMigrationCompleted[] =
    "safety_hub.unused_site_permissions_revocation.migration_completed";

}  // namespace safety_hub_prefs

void RegisterSafetyHubProfilePrefs(PrefRegistrySimple* registry);

#endif  // CHROME_BROWSER_UI_SAFETY_HUB_SAFETY_HUB_PREFS_H_