OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 }; | 92 }; |
93 | 93 |
94 void RecordHandshakeState(HandshakeState state) { | 94 void RecordHandshakeState(HandshakeState state) { |
95 UMA_HISTOGRAM_ENUMERATION("Net.QuicHandshakeState", state, | 95 UMA_HISTOGRAM_ENUMERATION("Net.QuicHandshakeState", state, |
96 NUM_HANDSHAKE_STATES); | 96 NUM_HANDSHAKE_STATES); |
97 } | 97 } |
98 | 98 |
99 base::Value* NetLogQuicClientSessionCallback( | 99 base::Value* NetLogQuicClientSessionCallback( |
100 const QuicServerId* server_id, | 100 const QuicServerId* server_id, |
101 bool require_confirmation, | 101 bool require_confirmation, |
102 NetLog::LogLevel /* log_level */) { | 102 NetLogCaptureMode /* capture_mode */) { |
103 base::DictionaryValue* dict = new base::DictionaryValue(); | 103 base::DictionaryValue* dict = new base::DictionaryValue(); |
104 dict->SetString("host", server_id->host()); | 104 dict->SetString("host", server_id->host()); |
105 dict->SetInteger("port", server_id->port()); | 105 dict->SetInteger("port", server_id->port()); |
106 dict->SetBoolean("is_https", server_id->is_https()); | 106 dict->SetBoolean("is_https", server_id->is_https()); |
107 dict->SetBoolean("privacy_mode", | 107 dict->SetBoolean("privacy_mode", |
108 server_id->privacy_mode() == PRIVACY_MODE_ENABLED); | 108 server_id->privacy_mode() == PRIVACY_MODE_ENABLED); |
109 dict->SetBoolean("require_confirmation", require_confirmation); | 109 dict->SetBoolean("require_confirmation", require_confirmation); |
110 return dict; | 110 return dict; |
111 } | 111 } |
112 | 112 |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 return; | 933 return; |
934 | 934 |
935 // TODO(rch): re-enable this code once beta is cut. | 935 // TODO(rch): re-enable this code once beta is cut. |
936 // if (stream_factory_) | 936 // if (stream_factory_) |
937 // stream_factory_->OnSessionConnectTimeout(this); | 937 // stream_factory_->OnSessionConnectTimeout(this); |
938 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 938 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
939 // DCHECK_EQ(0u, GetNumOpenStreams()); | 939 // DCHECK_EQ(0u, GetNumOpenStreams()); |
940 } | 940 } |
941 | 941 |
942 } // namespace net | 942 } // namespace net |
OLD | NEW |