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..834be16f6c0bafa5f8f57181303e186bd1af3471 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" |
| @@ -104,7 +105,6 @@ void NetLogLogger::OnAddEntry(const net::NetLog::Entry& entry) { |
| base::DictionaryValue* NetLogLogger::GetConstants() { |
| base::DictionaryValue* constants_dict = new base::DictionaryValue(); |
| - |
|
xunjieli
2014/10/23 19:56:25
I will revert this edit in the next patch.
|
| // Version of the file format. |
| constants_dict->SetInteger("logFormatVersion", kLogFormatVersion); |
| @@ -258,6 +258,18 @@ 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 (size_t i = 0; i < active_groups.size(); i++) { |
| + field_trial_groups->AppendString(active_groups[i].group_name + ":" + |
| + active_groups[i].trial_name); |
| + } |
| + constants_dict->Set("activeFieldTrialGroups", field_trial_groups); |
| + } |
| + |
| return constants_dict; |
| } |