Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: net/base/net_log_logger.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/escape_unittest.cc ('k') | net/dns/dns_hosts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..99e769b27e0229ea944f663977e3c50e96e12645 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,20 @@ 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) {
+ field_trial_groups->AppendString(it->trial_name + ":" +
+ it->group_name);
+ }
+ constants_dict->Set("activeFieldTrialGroups", field_trial_groups);
+ }
+
return constants_dict;
}
« no previous file with comments | « net/base/escape_unittest.cc ('k') | net/dns/dns_hosts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698