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

Side by Side Diff: net/base/net_log_logger.cc

Issue 671253002: Added the list of active field groups to NetLog dump (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverted one edit Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/net_log_logger.h" 5 #include "net/base/net_log_logger.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/metrics/field_trial.h"
12 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "net/base/address_family.h" 15 #include "net/base/address_family.h"
15 #include "net/base/load_states.h" 16 #include "net/base/load_states.h"
16 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
17 #include "net/quic/quic_protocol.h" 18 #include "net/quic/quic_protocol.h"
18 #include "net/quic/quic_utils.h" 19 #include "net/quic/quic_utils.h"
19 20
20 namespace { 21 namespace {
21 22
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 252
252 // Pass it as a string, since it may be too large to fit in an integer. 253 // Pass it as a string, since it may be too large to fit in an integer.
253 constants_dict->SetString("timeTickOffset", 254 constants_dict->SetString("timeTickOffset",
254 base::Int64ToString(tick_to_unix_time_ms)); 255 base::Int64ToString(tick_to_unix_time_ms));
255 } 256 }
256 257
257 // "clientInfo" key is required for some NetLogLogger log readers. 258 // "clientInfo" key is required for some NetLogLogger log readers.
258 // Provide a default empty value for compatibility. 259 // Provide a default empty value for compatibility.
259 constants_dict->Set("clientInfo", new base::DictionaryValue()); 260 constants_dict->Set("clientInfo", new base::DictionaryValue());
260 261
262 // Add a list of active field experiments.
263 {
264 base::FieldTrial::ActiveGroups active_groups;
265 base::FieldTrialList::GetActiveFieldTrialGroups(&active_groups);
266 base::ListValue* field_trial_groups = new base::ListValue();
267 for (size_t i = 0; i < active_groups.size(); i++) {
mmenke 2014/10/23 20:50:23 nit: Should use an iterator (size() can theoretic
xunjieli 2014/10/23 21:32:39 Done.
268 field_trial_groups->AppendString(active_groups[i].group_name + ":" +
269 active_groups[i].trial_name);
mmenke 2014/10/23 20:50:23 Trial name should probably go first - generally go
xunjieli 2014/10/23 21:32:39 Done. I see! thanks for the explanation!
270 }
271 constants_dict->Set("activeFieldTrialGroups", field_trial_groups);
272 }
273
261 return constants_dict; 274 return constants_dict;
262 } 275 }
263 276
264 } // namespace net 277 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698