Remove Net.Port.Alpaca histogram
The Net.Port.Alpaca histogram is no longer needed. Remove it.
BUG=1323807
Change-Id: Ia9eef0b07394de4cd304bb5b78fed67ca99ff904
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3653802
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1005684}
NOKEYCHECK=True
GitOrigin-RevId: b390bd148ec0cb1bd4fbf014ef05ac4d8745b0f0
diff --git a/base/port_util.cc b/base/port_util.cc
index 0c406e5..775efb0 100644
--- a/base/port_util.cc
+++ b/base/port_util.cc
@@ -20,35 +20,6 @@
namespace {
-// Records ports that may need blocking to mitigate the ALPACA vulnerability.
-// See https://alpaca-attack.com/ and https://github.com/whatwg/fetch/pull/1250.
-void LogAlpacaPort(int port) {
- // Unlike the obsolete Net.Port.SlipStreamRestricted histogram, we don't
- // record an "Other" category. Instead, historical data from
- // Net.Port.SlipStreamRestricted can be used as a baseline for comparisons.
- enum class AlpacaPort {
- k26 = 0,
- k989 = 1,
- k990 = 2,
- k2525 = 3,
- kMaxValue = k2525,
- };
-
- constexpr std::pair<int, AlpacaPort> kMap[] = {
- {26, AlpacaPort::k26},
- {989, AlpacaPort::k989},
- {990, AlpacaPort::k990},
- {2525, AlpacaPort::k2525},
- };
-
- for (const auto& pair : kMap) {
- if (pair.first == port) {
- base::UmaHistogramEnumeration("Net.Port.Alpaca", pair.second);
- return;
- }
- }
-}
-
// The general list of blocked ports. Will be blocked unless a specific
// protocol overrides it. (Ex: ftp can use port 21)
// When adding a port to the list, consider also adding it to kAllowablePorts,
@@ -175,8 +146,6 @@
if (!IsPortValid(port))
return false;
- LogAlpacaPort(port);
-
// Allow explicitly allowed ports for any scheme.
if (g_explicitly_allowed_ports.Get().count(port) > 0)
return true;