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, ...@@ -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 } // namespace
// static // static
...@@ -262,7 +255,6 @@ void InstallAttributes::LockDevice(policy::DeviceMode device_mode, ...@@ -262,7 +255,6 @@ void InstallAttributes::LockDevice(policy::DeviceMode device_mode,
} }
// Already locked in the right mode, signal success. // Already locked in the right mode, signal success.
ReportExistingLockUma(true /* is_existing_lock */);
std::move(callback).Run(LOCK_SUCCESS); std::move(callback).Run(LOCK_SUCCESS);
return; return;
} }
...@@ -367,7 +359,6 @@ void InstallAttributes::OnReadImmutableAttributes(policy::DeviceMode mode, ...@@ -367,7 +359,6 @@ void InstallAttributes::OnReadImmutableAttributes(policy::DeviceMode mode,
return; return;
} }
ReportExistingLockUma(false /* is_existing_lock */);
std::move(callback).Run(LOCK_SUCCESS); std::move(callback).Run(LOCK_SUCCESS);
} }
......
...@@ -97,53 +97,33 @@ class InstallAttributesTest : public testing::Test { ...@@ -97,53 +97,33 @@ class InstallAttributesTest : public testing::Test {
}; };
TEST_F(InstallAttributesTest, Lock) { TEST_F(InstallAttributesTest, Lock) {
{ EXPECT_EQ(
base::HistogramTester histogram_tester; InstallAttributes::LOCK_SUCCESS,
EXPECT_EQ( LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, kTestDomain,
InstallAttributes::LOCK_SUCCESS, std::string(), // realm
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, kTestDomain, kTestDeviceId));
std::string(), // realm
kTestDeviceId));
histogram_tester.ExpectUniqueSample(
"Enterprise.ExistingInstallAttributesLock", 0, 1);
}
{ // Locking an already locked device should succeed if the parameters match.
// Locking an already locked device should succeed if the parameters match. EXPECT_EQ(
base::HistogramTester histogram_tester; InstallAttributes::LOCK_SUCCESS,
EXPECT_EQ( LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, kTestDomain,
InstallAttributes::LOCK_SUCCESS, std::string(), // realm
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, kTestDomain, kTestDeviceId));
std::string(), // realm
kTestDeviceId));
histogram_tester.ExpectUniqueSample(
"Enterprise.ExistingInstallAttributesLock", 1, 1);
}
{ // But another domain should fail.
// But another domain should fail. EXPECT_EQ(InstallAttributes::LOCK_WRONG_DOMAIN,
base::HistogramTester histogram_tester; LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE,
EXPECT_EQ(InstallAttributes::LOCK_WRONG_DOMAIN, "anotherexample.com",
LockDeviceAndWaitForResult(policy::DEVICE_MODE_ENTERPRISE, std::string(), // realm
"anotherexample.com", kTestDeviceId));
std::string(), // realm
kTestDeviceId));
histogram_tester.ExpectTotalCount(
"Enterprise.ExistingInstallAttributesLock", 0);
}
{ // A non-matching mode should fail as well.
// A non-matching mode should fail as well. EXPECT_EQ(
base::HistogramTester histogram_tester; InstallAttributes::LOCK_WRONG_MODE,
EXPECT_EQ(InstallAttributes::LOCK_WRONG_MODE, LockDeviceAndWaitForResult(policy::DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH,
LockDeviceAndWaitForResult( std::string(), // domain
policy::DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH, std::string(), // realm
std::string(), // domain std::string())); // device id
std::string(), // realm
std::string())); // device id
histogram_tester.ExpectTotalCount(
"Enterprise.ExistingInstallAttributesLock", 0);
}
} }
TEST_F(InstallAttributesTest, IsEnterpriseManagedCloud) { TEST_F(InstallAttributesTest, IsEnterpriseManagedCloud) {
......
...@@ -652,6 +652,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -652,6 +652,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Enterprise.ExistingInstallAttributesLock" <histogram name="Enterprise.ExistingInstallAttributesLock"
enum="EnterpriseExistingInstallAttributesLockType" enum="EnterpriseExistingInstallAttributesLockType"
expires_after="2020-07-01"> expires_after="2020-07-01">
<obsolete>
Removed 2020/11.
</obsolete>
<owner>emaxx@chromium.org</owner> <owner>emaxx@chromium.org</owner>
<owner>poromov@chromium.org</owner> <owner>poromov@chromium.org</owner>
<owner>rsorokin@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