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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
// 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 COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
#define COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
#include "extensions/buildflags/buildflags.h"
namespace prefs {
// A bool pref that keeps whether the child status for this profile was already
// successfully checked via ChildAccountService.
inline constexpr char kChildAccountStatusKnown[] = "child_account_status_known";
// Stores the email address associated with the google account of the custodian
// of the supervised user, set when the supervised user is created.
inline constexpr char kSupervisedUserCustodianEmail[] =
"profile.managed.custodian_email";
// Stores the display name associated with the google account of the custodian
// of the supervised user, updated (if possible) each time the supervised user
// starts a session.
inline constexpr char kSupervisedUserCustodianName[] =
"profile.managed.custodian_name";
// Stores the obfuscated gaia id associated with the google account of the
// custodian of the supervised user, updated (if possible) each time the
// supervised user starts a session.
inline constexpr char kSupervisedUserCustodianObfuscatedGaiaId[] =
"profile.managed.custodian_obfuscated_gaia_id";
// Stores the URL of the profile image associated with the google account of the
// custodian of the supervised user.
inline constexpr char kSupervisedUserCustodianProfileImageURL[] =
"profile.managed.custodian_profile_image_url";
// Stores the URL of the profile associated with the google account of the
// custodian of the supervised user.
inline constexpr char kSupervisedUserCustodianProfileURL[] =
"profile.managed.custodian_profile_url";
// Stores the email address associated with the google account of the secondary
// custodian of the supervised user, set when the supervised user is created.
inline constexpr char kSupervisedUserSecondCustodianEmail[] =
"profile.managed.second_custodian_email";
// Stores the display name associated with the google account of the secondary
// custodian of the supervised user, updated (if possible) each time the
// supervised user starts a session.
inline constexpr char kSupervisedUserSecondCustodianName[] =
"profile.managed.second_custodian_name";
// Stores the obfuscated gaia id associated with the google account of the
// secondary custodian of the supervised user, updated (if possible) each time
// the supervised user starts a session.
inline constexpr char kSupervisedUserSecondCustodianObfuscatedGaiaId[] =
"profile.managed.second_custodian_obfuscated_gaia_id";
// Stores the URL of the profile image associated with the google account of the
// secondary custodian of the supervised user.
inline constexpr char kSupervisedUserSecondCustodianProfileImageURL[] =
"profile.managed.second_custodian_profile_image_url";
// Stores the URL of the profile associated with the google account of the
// secondary custodian of the supervised user.
inline constexpr char kSupervisedUserSecondCustodianProfileURL[] =
"profile.managed.second_custodian_profile_url";
// Whether the supervised user may approve extension permission requests. If
// false, extensions should not be able to request new permissions, and new
// extensions should not be installable.
//
// Only valid if supervised_user::
// IsSupervisedUserSkipParentApprovalToInstallExtensionsEnabled() is false.
inline constexpr char kSupervisedUserExtensionsMayRequestPermissions[] =
"profile.managed.extensions_may_request_permissions";
// Whether the supervised user may approve extension permission requests, under
// the updated supervised user extension handling flow.
// If true extensions can be installed without parental approval, if false
// the parent must grant approvoal on each installation.
//
// Only valid if supervised_user::
// IsSupervisedUserSkipParentApprovalToInstallExtensionsEnabled() is true.
inline constexpr char kSkipParentApprovalToInstallExtensions[] =
"profile.managed.skip_parent_approval_to_install_extensions";
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
// DictionaryValue that maps extension ids to the approved version of this
// extension for a supervised user. Missing extensions are not approved.
inline constexpr char kSupervisedUserApprovedExtensions[] =
"profile.managed.approved_extensions";
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
// The supervised user ID.
// TODO(b/342097235): this pref is being deprecated.
inline constexpr char kSupervisedUserId[] = "profile.managed_user_id";
// Maps host names to whether the host is manually allowed or blocked.
inline constexpr char kSupervisedUserManualHosts[] =
"profile.managed.manual_hosts";
// Maps URLs to whether the URL is manually allowed or blocked.
inline constexpr char kSupervisedUserManualURLs[] =
"profile.managed.manual_urls";
// Integer pref to record the day id (number of days since origin of time) when
// supervised user metrics were last recorded.
inline constexpr char kSupervisedUserMetricsDayId[] =
"supervised_user.metrics.day_id";
// Stores whether the SafeSites filter is enabled.
inline constexpr char kSupervisedUserSafeSites[] = "profile.managed.safe_sites";
// Stores settings that can be modified both by a supervised user and their
// manager. See SupervisedUserSharedSettingsService for a description of
// the format.
inline constexpr char kSupervisedUserSharedSettings[] =
"profile.managed.shared_settings";
// An integer pref specifying the fallback behavior for sites outside of content
// packs (see SupervisedUserFilter::FilteringBehavior). One of:
// 0: Allow (does nothing)
// 1: Warn [Deprecated]
// 2: Block
// 3: Invalid
inline constexpr char kDefaultSupervisedUserFilteringBehavior[] =
"profile.managed.default_filtering_behavior";
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
// An integer pref that stores the current state of the local extension
// parent approval migration when the feature
// `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes enabled.
// Its values are drawn from
// `supervised user::LocallyParentApprovedExtensionsMigrationState`.
inline constexpr char kLocallyParentApprovedExtensionsMigrationState[] =
"profile.managed.locally_parent_approved_extensions_migration_state";
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
// A dictionary pref that stores the extension Ids that are treated as
// parent-approved on a Desktop device when the feature
// `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes enabled.
// This is only populated on Win/Linux/Mac.
inline constexpr char kSupervisedUserLocallyParentApprovedExtensions[] =
"profile.managed.locally_parent_approved_extensions";
#endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE)
// A string pref that stores the family member role of the primary account
// as per kids_management::FamilyRole or
// `supervised_user::kDefaultEmptyFamilyMemberRole` if not in a Family group.
inline constexpr char kFamilyLinkUserMemberRole[] =
"profile.family_member_role";
} // namespace prefs
#endif // COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
|