Change fallback sampling trial logic

Previously, we would only create fallback sampling trials for UMA and
UKM if a seed was not used (e.g. during first run, there may not be a
seed).

This changes the condition to create the sampling trials when they do
not exist, even if a seed was used (e.g. the seed is missing the
sampling trials for some reason).

What this allows us to do (and what was initially intended) is for
e.g. not include the sampling trials in a certain seed (e.g. for Canary
channel) so that we can make sure we have coverage of the fallback
sampling trial logic.

This CL also moves fallback sampling trial code into its own files:
chrome/browser/metrics/chrome_browser_sampling_trials.{h,cc}

Bug: 1343558
Change-Id: I951772a7699155cb030afe44e010408b5136636d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3755311
Commit-Queue: Luc Nguyen <[email protected]>
Reviewed-by: Robert Kaplow <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1024831}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index e245893b..80500e14 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -790,6 +790,8 @@
     "metrics/bluetooth_metrics_provider.h",
     "metrics/chrome_browser_main_extra_parts_metrics.cc",
     "metrics/chrome_browser_main_extra_parts_metrics.h",
+    "metrics/chrome_browser_sampling_trials.cc",
+    "metrics/chrome_browser_sampling_trials.h",
     "metrics/chrome_feature_list_creator.cc",
     "metrics/chrome_feature_list_creator.h",
     "metrics/chrome_metrics_extensions_helper.cc",