Add RAW_PTR_EXCLUSION to files in base/

Add RAW_PTR_EXCLUSION to files in base/ where the rewriter could not automatically rewrite.

Change was generated by processing the output of the rewriter.

Bug: 1273182
Change-Id: I0e2083c172689261d9a7bc1ccde85a4366ed828c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4170100
Reviewed-by: Keishi Hattori <[email protected]>
Owners-Override: Keishi Hattori <[email protected]>
Commit-Queue: Keishi Hattori <[email protected]>
Reviewed-by: Bartek Nowierski <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1094319}
diff --git a/base/metrics/field_trial_params.h b/base/metrics/field_trial_params.h
index 0caab78..39cc5f0 100644
--- a/base/metrics/field_trial_params.h
+++ b/base/metrics/field_trial_params.h
@@ -11,6 +11,7 @@
 #include "base/base_export.h"
 #include "base/feature_list.h"
 #include "base/logging.h"
+#include "base/memory/raw_ptr_exclusion.h"
 #include "base/notreached.h"
 #include "base/time/time.h"
 
@@ -149,7 +150,9 @@
   // GetFieldTrialParamValueByFeature() for more details.
   BASE_EXPORT std::string Get() const;
 
-  const Feature* const feature;
+  // This field is not a raw_ptr<> because it was filtered by the rewriter for:
+  // #global-scope, #constexpr-ctor-field-initializer
+  RAW_PTR_EXCLUSION const Feature* const feature;
   const char* const name;
   const char* const default_value;
 };
@@ -172,7 +175,9 @@
   // GetFieldTrialParamValueByFeature() for more details.
   BASE_EXPORT double Get() const;
 
-  const Feature* const feature;
+  // This field is not a raw_ptr<> because it was filtered by the rewriter for:
+  // #global-scope, #constexpr-ctor-field-initializer
+  RAW_PTR_EXCLUSION const Feature* const feature;
   const char* const name;
   const double default_value;
 };
@@ -195,7 +200,9 @@
   // GetFieldTrialParamValueByFeature() for more details.
   BASE_EXPORT int Get() const;
 
-  const Feature* const feature;
+  // This field is not a raw_ptr<> because it was filtered by the rewriter for:
+  // #global-scope, #constexpr-ctor-field-initializer
+  RAW_PTR_EXCLUSION const Feature* const feature;
   const char* const name;
   const int default_value;
 };
@@ -218,7 +225,9 @@
   // GetFieldTrialParamValueByFeature() for more details.
   BASE_EXPORT bool Get() const;
 
-  const Feature* const feature;
+  // This field is not a raw_ptr<> because it was filtered by the rewriter for:
+  // #global-scope, #constexpr-ctor-field-initializer
+  RAW_PTR_EXCLUSION const Feature* const feature;
   const char* const name;
   const bool default_value;
 };
@@ -241,7 +250,9 @@
   // GetFieldTrialParamValueByFeature() for more details.
   BASE_EXPORT base::TimeDelta Get() const;
 
-  const Feature* const feature;
+  // This field is not a raw_ptr<> because it was filtered by the rewriter for:
+  // #global-scope, #constexpr-ctor-field-initializer
+  RAW_PTR_EXCLUSION const Feature* const feature;
   const char* const name;
   const base::TimeDelta default_value;
 };
@@ -310,10 +321,14 @@
     return "";
   }
 
-  const base::Feature* const feature;
+  // This field is not a raw_ptr<> because it was filtered by the rewriter for:
+  // #global-scope, #constexpr-ctor-field-initializer
+  RAW_PTR_EXCLUSION const base::Feature* const feature;
   const char* const name;
   const Enum default_value;
-  const Option* const options;
+  // This field is not a raw_ptr<> because it was filtered by the rewriter for:
+  // #global-scope, #constexpr-ctor-field-initializer
+  RAW_PTR_EXCLUSION const Option* const options;
   const size_t option_count;
 };