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

Side by Side Diff: net/quic/quic_connection_logger.cc

Issue 2037933002: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « net/quic/quic_chromium_client_session.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/quic/quic_connection_logger.h" 5 #include "net/quic/quic_connection_logger.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 scoped_refptr<X509Certificate> cert, 229 scoped_refptr<X509Certificate> cert,
230 NetLogCaptureMode /* capture_mode */) { 230 NetLogCaptureMode /* capture_mode */) {
231 // Only the subjects are logged so that we can investigate connection pooling. 231 // Only the subjects are logged so that we can investigate connection pooling.
232 // More fields could be logged in the future. 232 // More fields could be logged in the future.
233 std::vector<std::string> dns_names; 233 std::vector<std::string> dns_names;
234 cert->GetDNSNames(&dns_names); 234 cert->GetDNSNames(&dns_names);
235 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 235 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
236 base::ListValue* subjects = new base::ListValue(); 236 base::ListValue* subjects = new base::ListValue();
237 for (std::vector<std::string>::const_iterator it = dns_names.begin(); 237 for (std::vector<std::string>::const_iterator it = dns_names.begin();
238 it != dns_names.end(); it++) { 238 it != dns_names.end(); it++) {
239 subjects->Append(new base::StringValue(*it)); 239 subjects->AppendString(*it);
240 } 240 }
241 dict->Set("subjects", subjects); 241 dict->Set("subjects", subjects);
242 return std::move(dict); 242 return std::move(dict);
243 } 243 }
244 244
245 void UpdatePacketGapSentHistogram(size_t num_consecutive_missing_packets) { 245 void UpdatePacketGapSentHistogram(size_t num_consecutive_missing_packets) {
246 UMA_HISTOGRAM_COUNTS("Net.QuicSession.PacketGapSent", 246 UMA_HISTOGRAM_COUNTS("Net.QuicSession.PacketGapSent",
247 num_consecutive_missing_packets); 247 num_consecutive_missing_packets);
248 } 248 }
249 249
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 continue; 872 continue;
873 } 873 }
874 // Record some overlapping patterns, to get a better picture, since this is 874 // Record some overlapping patterns, to get a better picture, since this is
875 // not very expensive. 875 // not very expensive.
876 if (i % 3 == 0) 876 if (i % 3 == 0)
877 six_packet_histogram->Add(recent_6_mask); 877 six_packet_histogram->Add(recent_6_mask);
878 } 878 }
879 } 879 }
880 880
881 } // namespace net 881 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_chromium_client_session.cc ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698