Remove kWebMeasureMemoryViaPerformanceManager flag

This feature was enabled since 2020 (https://crrev.com/84af41a0)
Remove the flag.

Bug: 40132061
Change-Id: I267848223462fef8a84461494a4e27ec0f921d44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5471632
Reviewed-by: Joe Mason <joenotcharles@google.com>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290936}
diff --git a/components/performance_manager/v8_memory/web_memory_impl.cc b/components/performance_manager/v8_memory/web_memory_impl.cc
index b4eefb3..915ba8c 100644
--- a/components/performance_manager/v8_memory/web_memory_impl.cc
+++ b/components/performance_manager/v8_memory/web_memory_impl.cc
@@ -26,7 +26,6 @@
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/common/content_switches.h"
-#include "third_party/blink/public/common/features.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
@@ -159,13 +158,6 @@
   // If that happens the DocumentCoordinationUnit mojo interface is reset so
   // the measurement result will be thrown away, so this is not a security
   // issue, but it does mean doing extra work.
-
-  if (!base::FeatureList::IsEnabled(
-          blink::features::kWebMeasureMemoryViaPerformanceManager)) {
-    std::move(bad_message_callback)
-        .Run("WebMeasureMemoryViaPerformanceManager feature is disabled");
-    return;
-  }
   content::GetUIThreadTaskRunner({})->PostTask(
       FROM_HERE, base::BindOnce(&CheckIsCrossOriginIsolatedOnUISeq,
                                 frame->GetRenderFrameHostProxy(),
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
index ded5236..92f86c0 100644
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -2511,12 +2511,6 @@
 #endif
 );
 
-// Controls whether the implementation of the performance.measureMemory
-// web API uses PerformanceManager or not.
-BASE_FEATURE(kWebMeasureMemoryViaPerformanceManager,
-             "WebMeasureMemoryViaPerformanceManager",
-             base::FEATURE_ENABLED_BY_DEFAULT);
-
 BASE_FEATURE(kWebRtcCombinedNetworkAndWorkerThread,
              "WebRtcCombinedNetworkAndWorkerThread",
              base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h
index 56ed4d6..a4f1c0d 100644
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -1587,9 +1587,6 @@
 
 BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kWebFontsCacheAwareTimeoutAdaption);
 
-BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(
-    kWebMeasureMemoryViaPerformanceManager);
-
 // Combine WebRTC Network and Worker threads. More info at crbug.com/1373439.
 BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kWebRtcCombinedNetworkAndWorkerThread);
 #if BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
diff --git a/third_party/blink/renderer/core/timing/measure_memory/measure_memory_controller.cc b/third_party/blink/renderer/core/timing/measure_memory/measure_memory_controller.cc
index 16a0e7d..1d50764 100644
--- a/third_party/blink/renderer/core/timing/measure_memory/measure_memory_controller.cc
+++ b/third_party/blink/renderer/core/timing/measure_memory/measure_memory_controller.cc
@@ -8,7 +8,6 @@
 #include "base/rand_util.h"
 #include "components/performance_manager/public/mojom/coordination_unit.mojom-blink.h"
 #include "services/metrics/public/cpp/ukm_builders.h"
-#include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
 #include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
@@ -86,10 +85,6 @@
 };
 
 ApiStatus CheckMeasureMemoryAvailability() {
-  if (!base::FeatureList::IsEnabled(
-          features::kWebMeasureMemoryViaPerformanceManager)) {
-    return ApiStatus::kNotAvailableDueToFlag;
-  }
   if (!RuntimeEnabledFeatures::PerformanceManagerInstrumentationEnabled()) {
     return ApiStatus::kNotAvailableDueToResourceCoordinator;
   }