Revert "UMA for result of lock_to_single_user DBus call."
This reverts commit e442952502086a8f8204e8ac3a60a2bb82a7e1e3.
Reason for revert: A chain of reverts is needed in M76, so that a CL is reverted in M75 and then the chain is re-landed in M76 again.
Original change's description:
> UMA for result of lock_to_single_user DBus call.
>
> If the policy dictates to lock the device to single user, the failure
> to do so generates the user to be logged out. Here we add UMA stats to
> have metrics on how often this happens.
>
> BUG=b:77799573
> TEST=None
>
> Change-Id: I5eea6616628c2130f25c746b3ce9cabd63d139a9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1595868
> Commit-Queue: Igor <igorcov@chromium.org>
> Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
> Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
> Reviewed-by: Igor <igorcov@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#659955}
TBR=asvitkine@chromium.org,emaxx@chromium.org,igorcov@chromium.org
Change-Id: Iac895f2280dce4e3148b770b1e2e872d16b1fb6c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b:77799573
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614161
Reviewed-by: Igor <igorcov@chromium.org>
Commit-Queue: Igor <igorcov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660358}
diff --git a/chrome/browser/chromeos/policy/lock_to_single_user_manager.cc b/chrome/browser/chromeos/policy/lock_to_single_user_manager.cc
index d38f4a8..e97da6c 100644
--- a/chrome/browser/chromeos/policy/lock_to_single_user_manager.cc
+++ b/chrome/browser/chromeos/policy/lock_to_single_user_manager.cc
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "base/logging.h"
-#include "base/metrics/histogram_functions.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chromeos/cryptohome/cryptohome_parameters.h"
@@ -26,28 +25,6 @@
namespace policy {
-namespace {
-
-// The result from D-Bus call to lock the device to single user.
-// These values are logged to UMA. Entries should not be renumbered and
-// numeric values should never be reused. Please keep in sync with
-// "LockToSingleUserResult" in src/tools/metrics/histograms/enums.xml.
-enum class LockToSingleUserResult {
- // Successfully locked to single user.
- kSuccess = 0,
- // No response from DBus call.
- kNoResponse = 1,
- // Request failed on Chrome OS side.
- kFailedToLock = 2,
- kMaxValue = kFailedToLock,
-};
-
-void RecordDBusResult(LockToSingleUserResult result) {
- base::UmaHistogramEnumeration("Enterprise.LockToSingleUserResult", result);
-}
-
-} // namespace
-
LockToSingleUserManager::LockToSingleUserManager() {
CHECK(chromeos::LoginState::IsInitialized());
login_state_observer_.Add(chromeos::LoginState::Get());
@@ -96,11 +73,10 @@
void LockToSingleUserManager::OnLockToSingleUserMountUntilRebootDone(
base::Optional<cryptohome::BaseReply> reply) {
- // TODO(igorcov): Remove multi user sign in option from UI.
+ // TODO(igorcov): Add UMA stats and remove multi user sign in option from UI.
if (!reply || !reply->HasExtension(RebootOnSignOutReply::reply)) {
LOG(ERROR) << "Signing out user: no reply from "
"LockToSingleUserMountUntilReboot D-Bus call.";
- RecordDBusResult(LockToSingleUserResult::kNoResponse);
chrome::AttemptUserExit();
return;
}
@@ -113,11 +89,9 @@
// The device is locked to single user on TPM level. Update the cache in
// SessionTerminationManager, so that it triggers reboot on sign out.
chromeos::SessionTerminationManager::Get()->SetDeviceLockedToSingleUser();
- RecordDBusResult(LockToSingleUserResult::kSuccess);
} else {
LOG(ERROR) << "Signing out user: failed to lock device to single user: "
<< extension.result();
- RecordDBusResult(LockToSingleUserResult::kFailedToLock);
chrome::AttemptUserExit();
}
}
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 87694869..93631a9 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -32610,12 +32610,6 @@
<int value="9" label="Parent access button"/>
</enum>
-<enum name="LockToSingleUserResult">
- <int value="0" label="Success"/>
- <int value="1" label="No response"/>
- <int value="2" label="Failed to lock"/>
-</enum>
-
<enum name="LoginConsumerWhitelist">
<int value="0" label="ANY_USER_ALLOWED">Any user can sign in</int>
<int value="1" label="ONLY_WHITELISTED_ALLOWED">Whitelisted users only</int>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 70f1b9a..2f7051f 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -30898,17 +30898,6 @@
</summary>
</histogram>
-<histogram name="Enterprise.LockToSingleUserResult"
- enum="LockToSingleUserResult" expires_after="M79">
- <owner>emaxx@chromium.org</owner>
- <owner>igorcov@chromium.org</owner>
- <summary>
- Chrome OS only. The result of D-Bus call to lock device to single user.
- Estimated that till version M79 we should get enough stats to understand if
- there are big problems with the D-Bus call.
- </summary>
-</histogram>
-
<histogram
name="Enterprise.MachineLevelUserCloudPolicyEnrollment.InstallLevel_Win"
enum="BooleanIsSystemLevelInstall">