Show chrome://flags/#enable-unsafe-webgpu only on Dev/Canary

Bug: 852089
Change-Id: Ic327c81818932cd8647c9d66d6c3718aad87eb7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2147858
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Kai Ninomiya <[email protected]>
Cr-Commit-Position: refs/heads/master@{#758602}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 9421e3e..cfd613a 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -5316,6 +5316,14 @@
     return true;
   }
 
+  // enable-unsafe-webgpu is only available on Dev/Canary channels.
+  if (!strcmp("enable-unsafe-webgpu", entry.internal_name) &&
+      channel != version_info::Channel::DEV &&
+      channel != version_info::Channel::CANARY &&
+      channel != version_info::Channel::UNKNOWN) {
+    return true;
+  }
+
 #if defined(OS_WIN)
   // HDR mode works, but displays everything horribly wrong prior to windows 10.
   if (!strcmp("enable-hdr", entry.internal_name) &&