| 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_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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 observer->OnSessionClosed(net_error, port_migration_detected_); | 1050 observer->OnSessionClosed(net_error, port_migration_detected_); |
| 1051 } | 1051 } |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 std::unique_ptr<base::Value> QuicChromiumClientSession::GetInfoAsValue( | 1054 std::unique_ptr<base::Value> QuicChromiumClientSession::GetInfoAsValue( |
| 1055 const std::set<HostPortPair>& aliases) { | 1055 const std::set<HostPortPair>& aliases) { |
| 1056 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); | 1056 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
| 1057 dict->SetString("version", QuicVersionToString(connection()->version())); | 1057 dict->SetString("version", QuicVersionToString(connection()->version())); |
| 1058 dict->SetInteger("open_streams", GetNumOpenOutgoingStreams()); | 1058 dict->SetInteger("open_streams", GetNumOpenOutgoingStreams()); |
| 1059 std::unique_ptr<base::ListValue> stream_list(new base::ListValue()); | 1059 std::unique_ptr<base::ListValue> stream_list(new base::ListValue()); |
| 1060 for (StreamMap::const_iterator it = dynamic_streams().begin(); | 1060 for (DynamicStreamMap::const_iterator it = dynamic_streams().begin(); |
| 1061 it != dynamic_streams().end(); ++it) { | 1061 it != dynamic_streams().end(); ++it) { |
| 1062 stream_list->AppendString(base::UintToString(it->second->id())); | 1062 stream_list->AppendString(base::UintToString(it->second->id())); |
| 1063 } | 1063 } |
| 1064 dict->Set("active_streams", std::move(stream_list)); | 1064 dict->Set("active_streams", std::move(stream_list)); |
| 1065 | 1065 |
| 1066 dict->SetInteger("total_streams", num_total_streams_); | 1066 dict->SetInteger("total_streams", num_total_streams_); |
| 1067 dict->SetString("peer_address", peer_address().ToString()); | 1067 dict->SetString("peer_address", peer_address().ToString()); |
| 1068 dict->SetString("connection_id", base::Uint64ToString(connection_id())); | 1068 dict->SetString("connection_id", base::Uint64ToString(connection_id())); |
| 1069 dict->SetBoolean("connected", connection()->connected()); | 1069 dict->SetBoolean("connected", connection()->connected()); |
| 1070 const QuicConnectionStats& stats = connection()->GetStats(); | 1070 const QuicConnectionStats& stats = connection()->GetStats(); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 } | 1227 } |
| 1228 | 1228 |
| 1229 void QuicChromiumClientSession::DeletePromised( | 1229 void QuicChromiumClientSession::DeletePromised( |
| 1230 QuicClientPromisedInfo* promised) { | 1230 QuicClientPromisedInfo* promised) { |
| 1231 if (IsOpenStream(promised->id())) | 1231 if (IsOpenStream(promised->id())) |
| 1232 streams_pushed_and_claimed_count_++; | 1232 streams_pushed_and_claimed_count_++; |
| 1233 QuicClientSessionBase::DeletePromised(promised); | 1233 QuicClientSessionBase::DeletePromised(promised); |
| 1234 } | 1234 } |
| 1235 | 1235 |
| 1236 } // namespace net | 1236 } // namespace net |
| OLD | NEW |