Reland "Opt //base into unsafe-buffer-usage warnings, except PA and third_party"

This is a reland of commit 564151ecbdc682aa847d25d6eaf6f31d28e8e3df

Fixes for the build already landed before this was reverted.

Original change's description:
> Opt //base into unsafe-buffer-usage warnings, except PA and third_party
>
> Any files that have warnings are marked for now with
> `#pragma allow_unsafe_buffers` to allow them to compile. We can remove
> the pragmas as we make progress through //base.
>
> This will prevent new code from being added that is not bounds-safe.
>
> When clang plugins are not enabled use -Wno-unknown-pragmas to
> prevent errors on the pragmas we use to control the plugin. We
> avoid adding a define telling code if plugins are enabled, which
> would be needed to put the pragma behind a macro instead.
>
> Bug: 40284755
> Change-Id: If3ca901c5895dbc2f99dee63c5d350f44cb46029
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5457820
> Reviewed-by: Hans Wennborg <[email protected]>
> Commit-Queue: danakj <[email protected]>
> Reviewed-by: Lei Zhang <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1291999}

Bug: 40284755
Change-Id: I24a995bdf9e18fb7b66a6b37a905dd0c60a3c9ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5485646
Reviewed-by: Nico Weber <[email protected]>
Reviewed-by: Hans Wennborg <[email protected]>
Commit-Queue: danakj <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1292433}
diff --git a/base/rand_util_unittest.cc b/base/rand_util_unittest.cc
index 7f304e90..0e4bfda 100644
--- a/base/rand_util_unittest.cc
+++ b/base/rand_util_unittest.cc
@@ -2,6 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#ifdef UNSAFE_BUFFERS_BUILD
+// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
+#pragma allow_unsafe_buffers
+#endif
+
 #include "base/rand_util.h"
 
 #include <stddef.h>