Chromium Code Reviews| Index: net/base/net_log_logger.cc |
| diff --git a/net/base/net_log_logger.cc b/net/base/net_log_logger.cc |
| index 76b5b32224fe31d3004877180ab091239f66cea5..6a860bc3b547de81627609696630f5d473904442 100644 |
| --- a/net/base/net_log_logger.cc |
| +++ b/net/base/net_log_logger.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/json/json_writer.h" |
| #include "base/logging.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/metrics/field_trial.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "base/values.h" |
| #include "net/base/address_family.h" |
| @@ -258,6 +259,19 @@ base::DictionaryValue* NetLogLogger::GetConstants() { |
| // Provide a default empty value for compatibility. |
| constants_dict->Set("clientInfo", new base::DictionaryValue()); |
| + // Add a list of active field experiments. |
| + { |
| + base::FieldTrial::ActiveGroups active_groups; |
| + base::FieldTrialList::GetActiveFieldTrialGroups(&active_groups); |
| + base::ListValue* field_trial_groups = new base::ListValue(); |
| + for (base::FieldTrial::ActiveGroups::const_iterator it = |
| + active_groups.begin(); it != active_groups.end(); ++it) { |
|
mmenke
2014/10/23 21:46:45
optional nit: Suggest putting a linebreak after t
xunjieli
2014/10/23 22:18:38
Got it! Done.
|
| + field_trial_groups->AppendString(it->trial_name + ":" + |
| + it->group_name); |
| + } |
| + constants_dict->Set("activeFieldTrialGroups", field_trial_groups); |
| + } |
| + |
| return constants_dict; |
| } |