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

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

Issue 1660593004: Landing Recent QUIC changes until 01/28/2016 18:41 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0202
Patch Set: Created 4 years, 10 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/crypto/quic_crypto_server_config_test.cc ('k') | net/quic/quic_connection.h » ('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) 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_chromium_client_session.h" 5 #include "net/quic/quic_chromium_client_session.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 observer->OnSessionClosed(net_error); 883 observer->OnSessionClosed(net_error);
884 } 884 }
885 } 885 }
886 886
887 scoped_ptr<base::Value> QuicChromiumClientSession::GetInfoAsValue( 887 scoped_ptr<base::Value> QuicChromiumClientSession::GetInfoAsValue(
888 const std::set<HostPortPair>& aliases) { 888 const std::set<HostPortPair>& aliases) {
889 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 889 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
890 dict->SetString("version", QuicVersionToString(connection()->version())); 890 dict->SetString("version", QuicVersionToString(connection()->version()));
891 dict->SetInteger("open_streams", GetNumOpenOutgoingStreams()); 891 dict->SetInteger("open_streams", GetNumOpenOutgoingStreams());
892 scoped_ptr<base::ListValue> stream_list(new base::ListValue()); 892 scoped_ptr<base::ListValue> stream_list(new base::ListValue());
893 for (base::hash_map<QuicStreamId, ReliableQuicStream*>::const_iterator it = 893 for (StreamMap::const_iterator it = dynamic_streams().begin();
894 dynamic_streams().begin();
895 it != dynamic_streams().end(); ++it) { 894 it != dynamic_streams().end(); ++it) {
896 stream_list->Append( 895 stream_list->Append(
897 new base::StringValue(base::UintToString(it->second->id()))); 896 new base::StringValue(base::UintToString(it->second->id())));
898 } 897 }
899 dict->Set("active_streams", std::move(stream_list)); 898 dict->Set("active_streams", std::move(stream_list));
900 899
901 dict->SetInteger("total_streams", num_total_streams_); 900 dict->SetInteger("total_streams", num_total_streams_);
902 dict->SetString("peer_address", peer_address().ToString()); 901 dict->SetString("peer_address", peer_address().ToString());
903 dict->SetString("connection_id", base::Uint64ToString(connection_id())); 902 dict->SetString("connection_id", base::Uint64ToString(connection_id()));
904 dict->SetBoolean("connected", connection()->connected()); 903 dict->SetBoolean("connected", connection()->connected());
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 } 1018 }
1020 1019
1021 const DatagramClientSocket* QuicChromiumClientSession::GetDefaultSocket() 1020 const DatagramClientSocket* QuicChromiumClientSession::GetDefaultSocket()
1022 const { 1021 const {
1023 DCHECK(sockets_.back().get() != nullptr); 1022 DCHECK(sockets_.back().get() != nullptr);
1024 // The most recently added socket is the currently active one. 1023 // The most recently added socket is the currently active one.
1025 return sockets_.back().get(); 1024 return sockets_.back().get();
1026 } 1025 }
1027 1026
1028 } // namespace net 1027 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config_test.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698