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

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

Issue 1692253004: QUIC - chromium server push support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback round 1 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
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_CHROMIUM_CLIENT_SESSION_H_ 10 #ifndef NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 // Returns current default socket. This is the socket over which all 241 // Returns current default socket. This is the socket over which all
242 // QUIC packets are sent. This default socket can change, so do not store the 242 // QUIC packets are sent. This default socket can change, so do not store the
243 // returned socket. 243 // returned socket.
244 const DatagramClientSocket* GetDefaultSocket() const; 244 const DatagramClientSocket* GetDefaultSocket() const;
245 245
246 bool IsAuthorized(const std::string& hostname) override; 246 bool IsAuthorized(const std::string& hostname) override;
247 247
248 protected: 248 protected:
249 // QuicSession methods: 249 // QuicSession methods:
250 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; 250 QuicChromiumClientStream* CreateIncomingDynamicStream(
251 QuicStreamId id) override;
251 252
252 private: 253 private:
253 friend class test::QuicChromiumClientSessionPeer; 254 friend class test::QuicChromiumClientSessionPeer;
254 255
255 typedef std::set<Observer*> ObserverSet; 256 typedef std::set<Observer*> ObserverSet;
256 typedef std::list<StreamRequest*> StreamRequestQueue; 257 typedef std::list<StreamRequest*> StreamRequestQueue;
257 258
258 QuicChromiumClientStream* CreateOutgoingReliableStreamImpl(); 259 QuicChromiumClientStream* CreateOutgoingReliableStreamImpl();
260 QuicChromiumClientStream* CreateIncomingReliableStreamImpl(QuicStreamId id);
259 // A completion callback invoked when a read completes. 261 // A completion callback invoked when a read completes.
260 void OnReadComplete(int result); 262 void OnReadComplete(int result);
261 263
262 void OnClosedStream(); 264 void OnClosedStream();
263 265
264 // Close the session because of |error| and records it in UMA histogram. 266 // Close the session because of |error| and records it in UMA histogram.
265 void RecordAndCloseSessionOnError(int error, QuicErrorCode quic_error); 267 void RecordAndCloseSessionOnError(int error, QuicErrorCode quic_error);
266 268
267 // A Session may be closed via any of three methods: 269 // A Session may be closed via any of three methods:
268 // OnConnectionClosed - called by the connection when the connection has been 270 // OnConnectionClosed - called by the connection when the connection has been
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 bool going_away_; 317 bool going_away_;
316 QuicDisabledReason disabled_reason_; 318 QuicDisabledReason disabled_reason_;
317 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; 319 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_;
318 320
319 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); 321 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession);
320 }; 322 };
321 323
322 } // namespace net 324 } // namespace net
323 325
324 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ 326 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698