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

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

Issue 23597045: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged QuicPriority to RequestPriority changes Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_connection_logger.h ('k') | net/quic/quic_connection_test.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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "net/base/net_log.h" 12 #include "net/base/net_log.h"
13 #include "net/quic/crypto/crypto_handshake.h" 13 #include "net/quic/crypto/crypto_handshake.h"
14 14
15 using std::string;
16
15 namespace net { 17 namespace net {
16 18
17 namespace { 19 namespace {
18 20
19 base::Value* NetLogQuicPacketCallback(const IPEndPoint* self_address, 21 base::Value* NetLogQuicPacketCallback(const IPEndPoint* self_address,
20 const IPEndPoint* peer_address, 22 const IPEndPoint* peer_address,
21 size_t packet_size, 23 size_t packet_size,
22 NetLog::LogLevel /* log_level */) { 24 NetLog::LogLevel /* log_level */) {
23 base::DictionaryValue* dict = new base::DictionaryValue(); 25 base::DictionaryValue* dict = new base::DictionaryValue();
24 dict->SetString("self_address", self_address->ToString()); 26 dict->SetString("self_address", self_address->ToString());
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 base::Bind(&NetLogQuicCryptoHandshakeMessageCallback, &message)); 411 base::Bind(&NetLogQuicCryptoHandshakeMessageCallback, &message));
410 } 412 }
411 413
412 void QuicConnectionLogger::OnConnectionClose(QuicErrorCode error, 414 void QuicConnectionLogger::OnConnectionClose(QuicErrorCode error,
413 bool from_peer) { 415 bool from_peer) {
414 net_log_.AddEvent( 416 net_log_.AddEvent(
415 NetLog::TYPE_QUIC_SESSION_CLOSED, 417 NetLog::TYPE_QUIC_SESSION_CLOSED,
416 base::Bind(&NetLogQuicConnectionClosedCallback, error, from_peer)); 418 base::Bind(&NetLogQuicConnectionClosedCallback, error, from_peer));
417 } 419 }
418 420
421 void QuicConnectionLogger::OnSuccessfulVersionNegotiation(
422 const QuicVersion& version) {
423 string quic_version = QuicVersionToString(version);
424 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_VERSION_NEGOTIATED,
425 NetLog::StringCallback("version", &quic_version));
426 }
427
419 } // namespace net 428 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698