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 159 160 161
|
// Copyright 2021 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_PERMISSIONS_CONSTANTS_H_
#define COMPONENTS_PERMISSIONS_CONSTANTS_H_
#include <string_view>
#include "base/component_export.h"
#include "base/time/clock.h"
#include "build/build_config.h"
namespace permissions {
// The URL for the Bluetooth Overview help center article in the Web Bluetooth
// Chooser.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kChooserBluetoothOverviewURL[];
// The URL for the Embedded Content help center article in the SAA permission
// prompt.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kEmbeddedContentHelpCenterURL[];
// The key in `Product Specific String Data` under which the disposition of the
// permission prompt is recorded in the prompt HaTS survey.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionsPromptSurveyPromptDispositionKey[];
// The key in `Product Specific String Data` under which the quiet UI reason is
// recorded in the prompt HaTS survey.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionsPromptSurveyPromptDispositionReasonKey[];
// The key in `Product Specific String Data` under which the request action is
// recorded in the prompt HaTS survey.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionsPromptSurveyActionKey[];
// The key in `Product Specific String Data` under which the request type is
// recorded in the prompt HaTS survey.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionsPromptSurveyRequestTypeKey[];
// The key in `Product Specific String Data` under which the display timing of
// the survey is recorded in the prompt HaTS survey.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionsPromptSurveyDisplayTimeKey[];
// The key in `Product Specific String Data` under which the 'one time prompts
// decided' count bucket of the user taking the prompt HaTS survey is recorded.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyOneTimePromptsDecidedBucketKey[];
// The key in `Product Specific String Data` under which the URL on which the
// prompt HaTS survey was triggered is recorded.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyUrlKey[];
// The key in `Product Specific Bits Data` under which whether the prompt was
// triggered by a user gestured is recorded in the prompt HaTS survey.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionsPromptSurveyHadGestureKey[];
// The key in `Product Specific Strings Data` under which the release channel on
// which the prompt was triggered is recorded in the prompt HaTS survey.
// Note that a finch config typically defines a min_version to run the
// experiment. When Version V is stable, Beta (V+1), Dev (V+2) and Canary (V+3)
// all have higher version numbers and will therefore be part of the experiment
// with min_version V with the rollout plan for stable. This filter allows
// restriction to specific channels (typically to stable).
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionsPromptSurveyReleaseChannelKey[];
// The key in `Product Specific Strings Data` under which the prompt position is
// recorded if relevant. The prompt position is only recorded for PEPC
// permission prompts.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyPepcPromptPositionKey[];
// The key in `Product Specific Strings Data` under which the initial permission
// status is recorded. The initial permission status refers to the permission
// status before the prompt has been shown. For prompts other than PEPC
// permission prompts, this will always be "ask".
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyInitialPermissionStatusKey[];
// The key in `Product Specific Bits Data` under which the information about
// whether a permissions prompt preview for camera / microphone permissions
// was visible at all (i.e. whether camera preview received video frames, and
// whether microphone preview received audio samples). For prompts not related
// to camera/microphone permissions, this will always be false.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyPreviewVisibleKey[];
// The key in `Product Specific Bits Data` under which the information about
// whether a permissions prompt preview for camera / microphone permissions
// had a device selection dropdown that was interacted with by the user.
// For prompts not related to camera/microphone permissions, this will always
// be false.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyPreviewDropdownInteractedKey[];
// The key in `Product Specific Bits Data` under which the information about
// whether a permissions prompt preview for camera / microphone permissions
// was a combined prompt.
// For prompts not related to camera/microphone permissions, this will always
// be false.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyPreviewWasCombinedKey[];
// The key in `Product Specific String Data` under which the information about
// how long it took (in milliseconds) for the user to make a decision. For
// prompts not related to camera/microphone permissions, this will always be
// empty string.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyPreviewTimeToDecisionKey[];
// The key in `Product Specific String Data` under which the information about
// how long it took (in milliseconds) for the video or audio preview to become
// visible (i.e. to start displaying video frames / audio levels to users). For
// prompts not related to camera/microphone permissions, this will always be
// empty string.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kPermissionPromptSurveyPreviewTimeToVisibleKey[];
// TODO(crbug.com/40254381): Remove the code related to unused site permissions
// from Android builds.
// The key used for marking permissions as revoked, as per the unused site
// permissions module of Safety Check, including both chooser and regular
// permissions.
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kRevokedKey[];
// The key for base::Value::Dict, holding the revoked chooser permission data.
// The Dict has std::string_view of ContentSettingsType int as key,
// and the corresponding revoked `base::Value` data as value.
// For example, {"3": {"foo": "bar"}, "12": "baz", "24": ["item0", "item1"]}
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const char kRevokedChooserPermissionsKey[];
// How long an explicit Storage Access API permission grant/denial should last
// (not taking renewals into account).
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const base::TimeDelta kStorageAccessAPIExplicitPermissionLifetime;
// How long an implicit Storage Access API permission grant/denial should last
// (not taking renewals into account).
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const base::TimeDelta kStorageAccessAPIImplicitPermissionLifetime;
// How long a Related Website Sets Storage Access API permission
// grant/denial should last (not taking renewals into account).
COMPONENT_EXPORT(PERMISSIONS_COMMON)
extern const base::TimeDelta kStorageAccessAPIRelatedWebsiteSetsLifetime;
} // namespace permissions
#endif // COMPONENTS_PERMISSIONS_CONSTANTS_H_
|