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

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

Issue 2351373003: Add methods in spdy/quic session to get stream id of pushed stream given the request url (Closed)
Patch Set: nits Created 4 years, 2 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/quic/chromium/quic_chromium_client_session.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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 std::unique_ptr<SpdyStream> ActivateCreatedStream(SpdyStream* stream); 805 std::unique_ptr<SpdyStream> ActivateCreatedStream(SpdyStream* stream);
806 806
807 // Inserts a newly-activated stream into |active_streams_|. 807 // Inserts a newly-activated stream into |active_streams_|.
808 void InsertActivatedStream(std::unique_ptr<SpdyStream> stream); 808 void InsertActivatedStream(std::unique_ptr<SpdyStream> stream);
809 809
810 // Remove all internal references to |stream|, call OnClose() on it, 810 // Remove all internal references to |stream|, call OnClose() on it,
811 // and process any pending stream requests before deleting it. Note 811 // and process any pending stream requests before deleting it. Note
812 // that |stream| may hold the last reference to the session. 812 // that |stream| may hold the last reference to the session.
813 void DeleteStream(std::unique_ptr<SpdyStream> stream, int status); 813 void DeleteStream(std::unique_ptr<SpdyStream> stream, int status);
814 814
815 // Returns the stream id of the push stream if it is not claimed yet, or 0
816 // otherwise.
817 SpdyStreamId GetStreamIdForPush(const GURL& url);
818
815 // Check if we have a pending pushed-stream for this url 819 // Check if we have a pending pushed-stream for this url
816 // Returns the stream if found (and returns it from the pending 820 // Returns the stream if found (and returns it from the pending
817 // list). Returns NULL otherwise. 821 // list). Returns NULL otherwise.
818 base::WeakPtr<SpdyStream> GetActivePushStream(const GURL& url); 822 base::WeakPtr<SpdyStream> GetActivePushStream(const GURL& url);
819 823
820 // Delegates to |stream->OnInitialResponseHeadersReceived()|. If an 824 // Delegates to |stream->OnInitialResponseHeadersReceived()|. If an
821 // error is returned, the last reference to |this| may have been 825 // error is returned, the last reference to |this| may have been
822 // released. 826 // released.
823 int OnInitialResponseHeadersReceived(const SpdyHeaderBlock& response_headers, 827 int OnInitialResponseHeadersReceived(const SpdyHeaderBlock& response_headers,
824 base::Time response_time, 828 base::Time response_time,
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 // Used for posting asynchronous IO tasks. We use this even though 1213 // Used for posting asynchronous IO tasks. We use this even though
1210 // SpdySession is refcounted because we don't need to keep the SpdySession 1214 // SpdySession is refcounted because we don't need to keep the SpdySession
1211 // alive if the last reference is within a RunnableMethod. Just revoke the 1215 // alive if the last reference is within a RunnableMethod. Just revoke the
1212 // method. 1216 // method.
1213 base::WeakPtrFactory<SpdySession> weak_factory_; 1217 base::WeakPtrFactory<SpdySession> weak_factory_;
1214 }; 1218 };
1215 1219
1216 } // namespace net 1220 } // namespace net
1217 1221
1218 #endif // NET_SPDY_SPDY_SESSION_H_ 1222 #endif // NET_SPDY_SPDY_SESSION_H_
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_session.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698