Make it so disabled field trials are not reported as active.

BUG=160310
TEST=New FieldTrialTest.DisabledTrialNotActive test and updated existing tests.

Review URL: https://chromiumcodereview.appspot.com/11359136

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167045 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/metrics/field_trial.h b/base/metrics/field_trial.h
index 764c635..765c50f0 100644
--- a/base/metrics/field_trial.h
+++ b/base/metrics/field_trial.h
@@ -217,9 +217,10 @@
 
   // Returns the trial name and selected group name for this field trial via
   // the output parameter |active_group|, but only if the group has already
-  // been chosen and has been externally observed via |group()|. In that case,
-  // true is returned and |active_group| is filled in; otherwise, the result
-  // is false and |active_group| is left untouched.
+  // been chosen and has been externally observed via |group()| and the trial
+  // has not been disabled. In that case, true is returned and |active_group|
+  // is filled in; otherwise, the result is false and |active_group| is left
+  // untouched.
   bool GetActiveGroup(ActiveGroup* active_group) const;
 
   // Returns the group_name. A winner need not have been chosen.
@@ -355,13 +356,15 @@
   // one process, and secondary processes can be synchronized on the result.
   // The resulting string contains the name and group name pairs of all
   // registered FieldTrials for which the group has been chosen and externally
-  // observed (via |group()|), with "/" used to separate all names and to
-  // terminate the string. This string is parsed by |CreateTrialsFromString()|.
+  // observed (via |group()|) and which have not been disabled, with "/" used
+  // to separate all names and to terminate the string. This string is parsed
+  // by |CreateTrialsFromString()|.
   static void StatesToString(std::string* output);
 
   // Fills in the supplied vector |active_groups| (which must be empty when
   // called) with a snapshot of all registered FieldTrials for which the group
-  // has been chosen and externally observed (via |group()|).
+  // has been chosen and externally observed (via |group()|) and which have
+  // not been disabled.
   static void GetActiveFieldTrialGroups(
       FieldTrial::ActiveGroups* active_groups);