Commit 5f86f1d1 authored by maxbogue's avatar maxbogue Committed by Commit bot

Add the Sync.PassphraseType histogram.

This logs the passphrase type on sync startup if encryption is enabled.

BUG=421623

Review URL: https://codereview.chromium.org/779093002

Cr-Commit-Position: refs/heads/master@{#307094}
parent 108c24de
......@@ -33,11 +33,14 @@ enum PassphraseRequiredReason {
// The different states for the encryption passphrase. These control if and how
// the user should be prompted for a decryption passphrase.
// Do not re-order or delete these entries; they are used in a UMA histogram.
// Please edit SyncPassphraseType in histograms.xml if a value is added.
enum PassphraseType {
IMPLICIT_PASSPHRASE = 0, // GAIA-based passphrase (deprecated).
KEYSTORE_PASSPHRASE = 1, // Keystore passphrase.
FROZEN_IMPLICIT_PASSPHRASE = 2, // Frozen GAIA passphrase.
CUSTOM_PASSPHRASE = 3, // User-provided passphrase.
PASSPHRASE_TYPE_SIZE, // The size of this enum; keep last.
};
// Enum used to distinguish which bootstrap encryption token is being updated.
......
......@@ -255,6 +255,10 @@ void SyncEncryptionHandlerImpl::Init() {
WriteEncryptionStateToNigori(&trans);
}
UMA_HISTOGRAM_ENUMERATION("Sync.PassphraseType",
GetPassphraseType(),
PASSPHRASE_TYPE_SIZE);
bool has_pending_keys = UnlockVault(
trans.GetWrappedTrans()).cryptographer.has_pending_keys();
bool is_ready = UnlockVault(
......
......@@ -36617,6 +36617,11 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary>
</histogram>
<histogram name="Sync.PassphraseType" enum="SyncPassphraseType">
<owner>maxbogue@chromium.org</owner>
<summary>The active sync passphrase type at sync startup.</summary>
</histogram>
<histogram name="Sync.PasswordAssociationTime" units="milliseconds">
<owner>zea@chromium.org</owner>
<summary>
......@@ -56365,6 +56370,13 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="3" label="Not migrated for an unknown reason"/>
</enum>
<enum name="SyncPassphraseType" type="int">
<int value="0" label="IMPLICIT_PASSPHRASE"/>
<int value="1" label="KEYSTORE_PASSPHRASE"/>
<int value="2" label="FROZEN_IMPLICIT_PASSPHRASE"/>
<int value="3" label="CUSTOM_PASSPHRASE"/>
</enum>
<enum name="SyncSimpleConflictResolutions" type="int">
<summary>
Sync simple conflict resolutions. The codes are listed in
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