Commit 4a7c9fb7 authored by James Hawkins's avatar James Hawkins Committed by Commit Bot

SmartLock: Log when the user attempts to enable the feature.

I say attempts because there is a chance the setup flow may fail or not
be completed.

R=hansberry@chromium.org

Bug: 831371
Test: none
Change-Id: Iecc9255433761428e8529bddaaaed78feaa602b4
Reviewed-on: https://chromium-review.googlesource.com/1020063
Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
Reviewed-by: default avatarRyan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552141}
parent 61213341
......@@ -82,7 +82,11 @@ const char kKeyDevices[] = "devices";
// The result of a SmartLock operation.
enum class SmartLockResult { FAILURE = false, SUCCESS = true };
const bool kSmartLockFeatureToggleDisable = false;
enum class SmartLockToggleFeature { DISABLE = false, ENABLE = true };
void LogToggleFeature(SmartLockToggleFeature toggle) {
UMA_HISTOGRAM_BOOLEAN("SmartLock.ToggleFeature", static_cast<bool>(toggle));
}
void LogToggleFeatureDisableResult(SmartLockResult result) {
UMA_HISTOGRAM_BOOLEAN("SmartLock.ToggleFeature.Disable.Result",
......@@ -249,6 +253,9 @@ AccountId EasyUnlockServiceRegular::GetAccountId() const {
void EasyUnlockServiceRegular::LaunchSetup() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
LogToggleFeature(SmartLockToggleFeature::ENABLE);
// TODO(tengs): To keep login working for existing EasyUnlock users, we need
// to explicitly disable login here for new users who set up EasyUnlock.
// After a sufficient number of releases, we should make the default value
......@@ -391,8 +398,7 @@ void EasyUnlockServiceRegular::RunTurnOffFlow() {
return;
DCHECK(!cryptauth_client_);
UMA_HISTOGRAM_BOOLEAN("SmartLock.ToggleFeature",
kSmartLockFeatureToggleDisable);
LogToggleFeature(SmartLockToggleFeature::DISABLE);
SetTurnOffFlowStatus(PENDING);
......
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