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

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

Issue 1692253004: QUIC - chromium server push support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initial for-review version Created 4 years, 9 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 // NOTE: This code is not shared between Google and Chrome. 5 // NOTE: This code is not shared between Google and Chrome.
6 6
7 #ifndef NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 7 #ifndef NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
8 #define NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 8 #define NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
11 11
12 #include "base/callback_forward.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "net/base/ip_endpoint.h" 14 #include "net/base/ip_endpoint.h"
14 #include "net/base/upload_data_stream.h" 15 #include "net/base/upload_data_stream.h"
15 #include "net/http/http_request_info.h" 16 #include "net/http/http_request_info.h"
16 #include "net/http/http_response_info.h" 17 #include "net/http/http_response_info.h"
17 #include "net/http/http_stream.h" 18 #include "net/http/http_stream.h"
18 #include "net/quic/quic_spdy_stream.h" 19 #include "net/quic/quic_spdy_stream.h"
19 20
20 namespace net { 21 namespace net {
21 22
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // turn out to be write blocked, of course). If the stream can not write, 90 // turn out to be write blocked, of course). If the stream can not write,
90 // this method returns false, and |callback| will be invoked when 91 // this method returns false, and |callback| will be invoked when
91 // it becomes writable. 92 // it becomes writable.
92 bool CanWrite(const CompletionCallback& callback); 93 bool CanWrite(const CompletionCallback& callback);
93 94
94 const BoundNetLog& net_log() const { return net_log_; } 95 const BoundNetLog& net_log() const { return net_log_; }
95 96
96 using QuicSpdyStream::HasBufferedData; 97 using QuicSpdyStream::HasBufferedData;
97 98
98 private: 99 private:
99 void NotifyDelegateOfHeadersCompleteLater(size_t frame_len); 100 void NotifyDelegateOfHeadersCompleteLater(const SpdyHeaderBlock& headers,
100 void NotifyDelegateOfHeadersComplete(size_t frame_len); 101 size_t frame_len);
102 void NotifyDelegateOfHeadersComplete(SpdyHeaderBlock headers,
103 size_t frame_len);
Ryan Hamilton 2016/02/24 00:34:00 I wonder if this can be done in a stand-alone CL.
Buck 2016/02/26 23:54:15 Done.
101 void NotifyDelegateOfDataAvailableLater(); 104 void NotifyDelegateOfDataAvailableLater();
102 void NotifyDelegateOfDataAvailable(); 105 void NotifyDelegateOfDataAvailable();
103 106
104 BoundNetLog net_log_; 107 BoundNetLog net_log_;
105 Delegate* delegate_; 108 Delegate* delegate_;
106 109
107 bool headers_delivered_; 110 bool headers_delivered_;
108 111
109 CompletionCallback callback_; 112 CompletionCallback callback_;
110 113
111 QuicClientSessionBase* session_; 114 QuicClientSessionBase* session_;
112 115
116 // Holds notifications generated before delegate_ is set.
117 std::deque<base::Closure> delegate_tasks_;
118
113 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; 119 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_;
114 120
115 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); 121 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream);
116 }; 122 };
117 123
118 } // namespace net 124 } // namespace net
119 125
120 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 126 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698