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 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ | 5 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ |
6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ | 6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // Called by a session after it shuts down. | 87 // Called by a session after it shuts down. |
88 void OnSessionClose(QuicClientSession* session); | 88 void OnSessionClose(QuicClientSession* session); |
89 | 89 |
90 // Cancels a pending request. | 90 // Cancels a pending request. |
91 void CancelRequest(QuicStreamRequest* request); | 91 void CancelRequest(QuicStreamRequest* request); |
92 | 92 |
93 // Closes all current sessions. | 93 // Closes all current sessions. |
94 void CloseAllSessions(int error); | 94 void CloseAllSessions(int error); |
95 | 95 |
| 96 base::Value* QuicStreamFactoryInfoToValue() const; |
| 97 |
96 private: | 98 private: |
97 class Job; | 99 class Job; |
98 | 100 |
99 typedef std::map<HostPortProxyPair, QuicClientSession*> SessionMap; | 101 typedef std::map<HostPortProxyPair, QuicClientSession*> SessionMap; |
100 typedef std::set<HostPortProxyPair> AliasSet; | 102 typedef std::set<HostPortProxyPair> AliasSet; |
101 typedef std::map<QuicClientSession*, AliasSet> SessionAliasMap; | 103 typedef std::map<QuicClientSession*, AliasSet> SessionAliasMap; |
102 typedef std::set<QuicClientSession*> SessionSet; | 104 typedef std::set<QuicClientSession*> SessionSet; |
103 typedef std::map<HostPortProxyPair, Job*> JobMap; | 105 typedef std::map<HostPortProxyPair, Job*> JobMap; |
104 typedef std::map<QuicStreamRequest*, Job*> RequestMap; | 106 typedef std::map<QuicStreamRequest*, Job*> RequestMap; |
105 typedef std::set<QuicStreamRequest*> RequestSet; | 107 typedef std::set<QuicStreamRequest*> RequestSet; |
(...skipping 24 matching lines...) Expand all Loading... |
130 RequestMap active_requests_; | 132 RequestMap active_requests_; |
131 | 133 |
132 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 134 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
133 | 135 |
134 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 136 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
135 }; | 137 }; |
136 | 138 |
137 } // namespace net | 139 } // namespace net |
138 | 140 |
139 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 141 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
OLD | NEW |