Commit 0bc5d1be authored by jdoerrie's avatar jdoerrie Committed by Commit bot

Measure usage of only CredentialRequestOptions.unmediated

This change adds a counter to measure usages of only providing
CredentialRequestOptions.unmediated.

BUG=721399

Review-Url: https://codereview.chromium.org/2899763002
Cr-Commit-Position: refs/heads/master@{#473858}
parent 1783a047
......@@ -1602,6 +1602,7 @@ class CORE_EXPORT UseCounter {
kShapeDetection_BarcodeDetectorConstructor = 1991,
kShapeDetection_FaceDetectorConstructor = 1992,
kShapeDetection_TextDetectorConstructor = 1993,
kCredentialManagerCredentialRequestOptionsOnlyUnmediated = 1994,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
......
......@@ -181,6 +181,9 @@ ScriptPromise CredentialsContainer::get(
String mediation = "optional";
if (options.hasUnmediated() && !options.hasMediation()) {
mediation = options.unmediated() ? "silent" : "optional";
UseCounter::Count(
context,
UseCounter::kCredentialManagerCredentialRequestOptionsOnlyUnmediated);
} else if (options.hasMediation()) {
mediation = options.mediation();
if (options.hasUnmediated() &&
......
......@@ -15008,6 +15008,8 @@ uploading your change for review. These are checked by presubmit scripts.
<int value="1991" label="ShapeDetection_BarcodeDetectorConstructor"/>
<int value="1992" label="ShapeDetection_FaceDetectorConstructor"/>
<int value="1993" label="ShapeDetection_TextDetectorConstructor"/>
<int value="1994"
label="CredentialManagerCredentialRequestOptionsOnlyUnmediated"/>
</enum>
<enum name="FeedbackSource" type="int">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment