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

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: Addressed comments 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 unified diff | Download patch
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 (base::FieldTrial::ActiveGroups::const_iterator it =
268 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.
269 field_trial_groups->AppendString(it->trial_name + ":" +
270 it->group_name);
271 }
272 constants_dict->Set("activeFieldTrialGroups", field_trial_groups);
273 }
274
261 return constants_dict; 275 return constants_dict;
262 } 276 }
263 277
264 } // namespace net 278 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698