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

Side by Side Diff: net/spdy/spdy_session.h

Issue 2167253002: s/SYN_STREAM/HEADERS/ in frame types, method names, comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_session.cc » ('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 #ifndef NET_SPDY_SPDY_SESSION_H_ 5 #ifndef NET_SPDY_SPDY_SESSION_H_
6 #define NET_SPDY_SPDY_SESSION_H_ 6 #define NET_SPDY_SPDY_SESSION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // authentication now. 355 // authentication now.
356 bool VerifyDomainAuthentication(const std::string& domain); 356 bool VerifyDomainAuthentication(const std::string& domain);
357 357
358 // Pushes the given producer into the write queue for 358 // Pushes the given producer into the write queue for
359 // |stream|. |stream| is guaranteed to be activated before the 359 // |stream|. |stream| is guaranteed to be activated before the
360 // producer is used to produce its frame. 360 // producer is used to produce its frame.
361 void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream, 361 void EnqueueStreamWrite(const base::WeakPtr<SpdyStream>& stream,
362 SpdyFrameType frame_type, 362 SpdyFrameType frame_type,
363 std::unique_ptr<SpdyBufferProducer> producer); 363 std::unique_ptr<SpdyBufferProducer> producer);
364 364
365 // Creates and returns a SYN frame for |stream_id|. 365 // Creates and returns a HEADERS frame for |stream_id|.
366 std::unique_ptr<SpdySerializedFrame> CreateSynStream(SpdyStreamId stream_id, 366 std::unique_ptr<SpdySerializedFrame> CreateHeaders(SpdyStreamId stream_id,
367 RequestPriority priority, 367 RequestPriority priority,
368 SpdyControlFlags flags, 368 SpdyControlFlags flags,
369 SpdyHeaderBlock headers); 369 SpdyHeaderBlock headers);
370 370
371 // Creates and returns a SpdyBuffer holding a data frame with the 371 // Creates and returns a SpdyBuffer holding a data frame with the
372 // given data. May return NULL if stalled by flow control. 372 // given data. May return NULL if stalled by flow control.
373 std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id, 373 std::unique_ptr<SpdyBuffer> CreateDataBuffer(SpdyStreamId stream_id,
374 IOBuffer* data, 374 IOBuffer* data,
375 int len, 375 int len,
376 SpdyDataFlags flags); 376 SpdyDataFlags flags);
377 377
378 // Close the stream with the given ID, which must exist and be 378 // Close the stream with the given ID, which must exist and be
379 // active. Note that that stream may hold the last reference to the 379 // active. Note that that stream may hold the last reference to the
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 598
599 typedef std::deque<base::WeakPtr<SpdyStreamRequest> > 599 typedef std::deque<base::WeakPtr<SpdyStreamRequest> >
600 PendingStreamRequestQueue; 600 PendingStreamRequestQueue;
601 601
602 struct ActiveStreamInfo { 602 struct ActiveStreamInfo {
603 ActiveStreamInfo(); 603 ActiveStreamInfo();
604 explicit ActiveStreamInfo(SpdyStream* stream); 604 explicit ActiveStreamInfo(SpdyStream* stream);
605 ~ActiveStreamInfo(); 605 ~ActiveStreamInfo();
606 606
607 SpdyStream* stream; 607 SpdyStream* stream;
608 bool waiting_for_syn_reply; 608 bool waiting_for_reply_headers_frame;
609 }; 609 };
610 typedef std::map<SpdyStreamId, ActiveStreamInfo> ActiveStreamMap; 610 typedef std::map<SpdyStreamId, ActiveStreamInfo> ActiveStreamMap;
611 611
612 typedef std::set<SpdyStream*> CreatedStreamSet; 612 typedef std::set<SpdyStream*> CreatedStreamSet;
613 613
614 enum AvailabilityState { 614 enum AvailabilityState {
615 // The session is available in its socket pool and can be used 615 // The session is available in its socket pool and can be used
616 // freely. 616 // freely.
617 STATE_AVAILABLE, 617 STATE_AVAILABLE,
618 // The session can process data on existing streams but will 618 // The session can process data on existing streams but will
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 // Used for posting asynchronous IO tasks. We use this even though 1201 // Used for posting asynchronous IO tasks. We use this even though
1202 // SpdySession is refcounted because we don't need to keep the SpdySession 1202 // SpdySession is refcounted because we don't need to keep the SpdySession
1203 // alive if the last reference is within a RunnableMethod. Just revoke the 1203 // alive if the last reference is within a RunnableMethod. Just revoke the
1204 // method. 1204 // method.
1205 base::WeakPtrFactory<SpdySession> weak_factory_; 1205 base::WeakPtrFactory<SpdySession> weak_factory_;
1206 }; 1206 };
1207 1207
1208 } // namespace net 1208 } // namespace net
1209 1209
1210 #endif // NET_SPDY_SPDY_SESSION_H_ 1210 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698