Adding local field trial for metrics/crash reports sampling.

This is to support the first-run case, if no first-run variations seed was available.

BUG=642086

Review-Url: https://codereview.chromium.org/2288853003
Cr-Commit-Position: refs/heads/master@{#415473}
diff --git a/chrome/browser/chrome_browser_field_trials.h b/chrome/browser/chrome_browser_field_trials.h
index f8c6fea..ff8c516 100644
--- a/chrome/browser/chrome_browser_field_trials.h
+++ b/chrome/browser/chrome_browser_field_trials.h
@@ -9,6 +9,7 @@
 #include "base/macros.h"
 
 namespace base {
+class FeatureList;
 class Time;
 }
 
@@ -19,6 +20,15 @@
 
   void SetupFieldTrials();
 
+  // Create field trials that will control feature list features. This should be
+  // called during the same timing window as
+  // FeatureList::AssociateReportingFieldTrial. |has_seed| indicates that the
+  // variations service used a seed to create field trials. This can be used to
+  // prevent associating a field trial with a feature that you expect to be
+  // controlled by the variations seed.
+  void SetupFeatureControllingFieldTrials(bool has_seed,
+                                          base::FeatureList* feature_list);
+
  private:
   // Instantiates dynamic trials by querying their state, to ensure they get
   // reported as used.