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

Side by Side Diff: net/quic/quic_client_session.h

Issue 1208933004: QUIC - disable QUIC under recent pathological connection errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: net-internals additions Created 5 years, 5 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
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 // A client specific QuicSession subclass. This class owns the underlying 5 // A client specific QuicSession subclass. This class owns the underlying
6 // QuicConnection and QuicConnectionHelper objects. The connection stores 6 // QuicConnection and QuicConnectionHelper objects. The connection stores
7 // a non-owning pointer to the helper so this session needs to ensure that 7 // a non-owning pointer to the helper so this session needs to ensure that
8 // the helper outlives the connection. 8 // the helper outlives the connection.
9 9
10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ 10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // than the number of round-trips needed for the handshake. 187 // than the number of round-trips needed for the handshake.
188 int GetNumSentClientHellos() const; 188 int GetNumSentClientHellos() const;
189 189
190 // Returns true if |hostname| may be pooled onto this session. If this 190 // Returns true if |hostname| may be pooled onto this session. If this
191 // is a secure QUIC session, then |hostname| must match the certificate 191 // is a secure QUIC session, then |hostname| must match the certificate
192 // presented during the handshake. 192 // presented during the handshake.
193 bool CanPool(const std::string& hostname, PrivacyMode privacy_mode) const; 193 bool CanPool(const std::string& hostname, PrivacyMode privacy_mode) const;
194 194
195 const QuicServerId& server_id() const { return server_id_; } 195 const QuicServerId& server_id() const { return server_id_; }
196 196
197 const QuicDisabledReason disabled_reason() const { return disabled_reason_; }
198
197 protected: 199 protected:
198 // QuicSession methods: 200 // QuicSession methods:
199 QuicDataStream* CreateIncomingDynamicStream(QuicStreamId id) override; 201 QuicDataStream* CreateIncomingDynamicStream(QuicStreamId id) override;
200 202
201 private: 203 private:
202 friend class test::QuicClientSessionPeer; 204 friend class test::QuicClientSessionPeer;
203 205
204 typedef std::set<Observer*> ObserverSet; 206 typedef std::set<Observer*> ObserverSet;
205 typedef std::list<StreamRequest*> StreamRequestQueue; 207 typedef std::list<StreamRequest*> StreamRequestQueue;
206 208
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 size_t num_total_streams_; 256 size_t num_total_streams_;
255 base::TaskRunner* task_runner_; 257 base::TaskRunner* task_runner_;
256 BoundNetLog net_log_; 258 BoundNetLog net_log_;
257 QuicPacketReader packet_reader_; 259 QuicPacketReader packet_reader_;
258 base::TimeTicks dns_resolution_end_time_; 260 base::TimeTicks dns_resolution_end_time_;
259 base::TimeTicks handshake_start_; // Time the handshake was started. 261 base::TimeTicks handshake_start_; // Time the handshake was started.
260 scoped_ptr<QuicConnectionLogger> logger_; 262 scoped_ptr<QuicConnectionLogger> logger_;
261 // True when the session is going away, and streams may no longer be created 263 // True when the session is going away, and streams may no longer be created
262 // on this session. Existing stream will continue to be processed. 264 // on this session. Existing stream will continue to be processed.
263 bool going_away_; 265 bool going_away_;
266 QuicDisabledReason disabled_reason_;
264 base::WeakPtrFactory<QuicClientSession> weak_factory_; 267 base::WeakPtrFactory<QuicClientSession> weak_factory_;
265 268
266 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); 269 DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
267 }; 270 };
268 271
269 } // namespace net 272 } // namespace net
270 273
271 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ 274 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698