Commit 6bced1ec authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Remove unused RAPPOR metrics

This CL removes (except for the enums) three unused RAPPOR metrics.
There are equivalent UKM metrics for these Web Components features.

Bug: 1016906
Change-Id: I13c14ab3113c5f39502ee00ec2b41140cbeaa19f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893519
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711633}
parent b987258a
......@@ -150,15 +150,6 @@ void HostsUsingFeatures::Value::Aggregate(HostsUsingFeatures::Value other) {
}
void HostsUsingFeatures::Value::RecordHostToRappor(const String& host) {
if (Get(Feature::kElementCreateShadowRoot))
Platform::Current()->RecordRappor("WebComponents.ElementCreateShadowRoot",
host);
if (Get(Feature::kElementAttachShadow))
Platform::Current()->RecordRappor("WebComponents.ElementAttachShadow",
host);
if (Get(Feature::kDocumentRegisterElement))
Platform::Current()->RecordRappor("WebComponents.DocumentRegisterElement",
host);
if (Get(Feature::kEventPath))
Platform::Current()->RecordRappor("WebComponents.EventPath", host);
if (Get(Feature::kDeviceMotionInsecureHost))
......
......@@ -27,8 +27,8 @@ class CORE_EXPORT HostsUsingFeatures {
// Features for RAPPOR. Do not reorder or remove!
enum class Feature {
kElementCreateShadowRoot,
kDocumentRegisterElement,
kElementCreateShadowRoot_Unused,
kDocumentRegisterElement_Unused,
kEventPath,
kDeviceMotionInsecureHost,
kDeviceOrientationInsecureHost,
......@@ -36,7 +36,7 @@ class CORE_EXPORT HostsUsingFeatures {
kGeolocationInsecureHost,
kGetUserMediaInsecureHost,
kGetUserMediaSecureHost,
kElementAttachShadow,
kElementAttachShadow_Unused,
kApplicationCacheManifestSelectInsecureHost,
kApplicationCacheAPIInsecureHost,
kRTCPeerConnectionAudio,
......
......@@ -13,25 +13,14 @@ TEST(HostsUsingFeaturesTest, countName) {
hosts_using_features.CountName(HostsUsingFeatures::Feature::kEventPath,
"test 1");
EXPECT_EQ(1u, hosts_using_features.ValueByName().size());
hosts_using_features.CountName(
HostsUsingFeatures::Feature::kElementCreateShadowRoot, "test 1");
EXPECT_EQ(1u, hosts_using_features.ValueByName().size());
hosts_using_features.CountName(HostsUsingFeatures::Feature::kEventPath,
"test 2");
EXPECT_EQ(2u, hosts_using_features.ValueByName().size());
EXPECT_TRUE(hosts_using_features.ValueByName().at("test 1").Get(
HostsUsingFeatures::Feature::kEventPath));
EXPECT_TRUE(hosts_using_features.ValueByName().at("test 1").Get(
HostsUsingFeatures::Feature::kElementCreateShadowRoot));
EXPECT_FALSE(hosts_using_features.ValueByName().at("test 1").Get(
HostsUsingFeatures::Feature::kDocumentRegisterElement));
EXPECT_TRUE(hosts_using_features.ValueByName().at("test 2").Get(
HostsUsingFeatures::Feature::kEventPath));
EXPECT_FALSE(hosts_using_features.ValueByName().at("test 2").Get(
HostsUsingFeatures::Feature::kElementCreateShadowRoot));
EXPECT_FALSE(hosts_using_features.ValueByName().at("test 2").Get(
HostsUsingFeatures::Feature::kDocumentRegisterElement));
hosts_using_features.Clear();
}
......
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