Commit 6a21a5c4 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Chromium LUCI CQ

Delete Enterprise.ExistingInstallAttributesLock

Delete the Enterprise.ExistingInstallAttributesLock UMA histogram. It's
expired a while ago and doesn't seem to be needed anymore.

Bug: 1084091
Change-Id: Ie62a2f3edae5d1084f0747ef0dc2e19f9c337d0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2548625
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarIgor <igorcov@chromium.org>
Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Commit-Queue: Mark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831965}
parent 411cda83
......@@ -62,13 +62,6 @@ void WarnIfNonempty(const std::map<std::string, std::string>& map,
}
}
// Reports the metric for whether the locking succeeded with existing locked
// attributes equal to the requested ones.
void ReportExistingLockUma(bool is_existing_lock) {
UMA_HISTOGRAM_BOOLEAN("Enterprise.ExistingInstallAttributesLock",
is_existing_lock);
}
} // namespace
// static
......@@ -262,7 +255,6 @@ void InstallAttributes::LockDevice(policy::DeviceMode device_mode,
}
// Already locked in the right mode, signal success.
ReportExistingLockUma(true /* is_existing_lock */);
std::move(callback).Run(LOCK_SUCCESS);
return;
}
......@@ -367,7 +359,6 @@ void InstallAttributes::OnReadImmutableAttributes(policy::DeviceMode mode,
return;
}
ReportExistingLockUma(false /* is_existing_lock */);
std::move(callback).Run(LOCK_SUCCESS);
}
......
......@@ -97,53 +97,33 @@ class InstallAttributesTest : public testing::Test {
};
TEST_F(InstallAttributesTest, Lock) {
{
base::HistogramTester histogram_tester;
EXPECT_EQ(
InstallAttributes::LOCK_SUCCESS,
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, kTestDomain,
std::string(), // realm
kTestDeviceId));
histogram_tester.ExpectUniqueSample(
"Enterprise.ExistingInstallAttributesLock", 0, 1);
}
EXPECT_EQ(
InstallAttributes::LOCK_SUCCESS,
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, kTestDomain,
std::string(), // realm
kTestDeviceId));
{
// Locking an already locked device should succeed if the parameters match.
base::HistogramTester histogram_tester;
EXPECT_EQ(
InstallAttributes::LOCK_SUCCESS,
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, kTestDomain,
std::string(), // realm
kTestDeviceId));
histogram_tester.ExpectUniqueSample(
"Enterprise.ExistingInstallAttributesLock", 1, 1);
}
// Locking an already locked device should succeed if the parameters match.
EXPECT_EQ(
InstallAttributes::LOCK_SUCCESS,
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, kTestDomain,
std::string(), // realm
kTestDeviceId));
{
// But another domain should fail.
base::HistogramTester histogram_tester;
EXPECT_EQ(InstallAttributes::LOCK_WRONG_DOMAIN,
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE,
"anotherexample.com",
std::string(), // realm
kTestDeviceId));
histogram_tester.ExpectTotalCount(
"Enterprise.ExistingInstallAttributesLock", 0);
}
// But another domain should fail.
EXPECT_EQ(InstallAttributes::LOCK_WRONG_DOMAIN,
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE,
"anotherexample.com",
std::string(), // realm
kTestDeviceId));
{
// A non-matching mode should fail as well.
base::HistogramTester histogram_tester;
EXPECT_EQ(InstallAttributes::LOCK_WRONG_MODE,
LockDeviceAndWaitForResult(
policy::DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH,
std::string(), // domain
std::string(), // realm
std::string())); // device id
histogram_tester.ExpectTotalCount(
"Enterprise.ExistingInstallAttributesLock", 0);
}
// A non-matching mode should fail as well.
EXPECT_EQ(
InstallAttributes::LOCK_WRONG_MODE,
LockDeviceAndWaitForResult(policy::DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH,
std::string(), // domain
std::string(), // realm
std::string())); // device id
}
TEST_F(InstallAttributesTest, IsEnterpriseManagedCloud) {
......
......@@ -652,6 +652,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Enterprise.ExistingInstallAttributesLock"
enum="EnterpriseExistingInstallAttributesLockType"
expires_after="2020-07-01">
<obsolete>
Removed 2020/11.
</obsolete>
<owner>emaxx@chromium.org</owner>
<owner>poromov@chromium.org</owner>
<owner>rsorokin@chromium.org</owner>
......
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