| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |