| OLD | NEW |
| 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_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_STREAM_H_ |
| 6 #define NET_SPDY_SPDY_STREAM_H_ | 6 #define NET_SPDY_SPDY_STREAM_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 // Returns true if the URL for this stream is known. | 246 // Returns true if the URL for this stream is known. |
| 247 bool HasUrl() const; | 247 bool HasUrl() const; |
| 248 | 248 |
| 249 // Get the URL associated with this stream. Only valid when has_url() is | 249 // Get the URL associated with this stream. Only valid when has_url() is |
| 250 // true. | 250 // true. |
| 251 GURL GetUrl() const; | 251 GURL GetUrl() const; |
| 252 | 252 |
| 253 // ChunkCallback methods. | 253 // ChunkCallback methods. |
| 254 virtual void OnChunkAvailable() OVERRIDE; | 254 virtual void OnChunkAvailable() OVERRIDE; |
| 255 | 255 |
| 256 int GetProtocolVersion() const; |
| 257 |
| 256 private: | 258 private: |
| 257 enum State { | 259 enum State { |
| 258 STATE_NONE, | 260 STATE_NONE, |
| 259 STATE_GET_ORIGIN_BOUND_CERT, | 261 STATE_GET_ORIGIN_BOUND_CERT, |
| 260 STATE_GET_ORIGIN_BOUND_CERT_COMPLETE, | 262 STATE_GET_ORIGIN_BOUND_CERT_COMPLETE, |
| 261 STATE_SEND_ORIGIN_BOUND_CERT, | 263 STATE_SEND_ORIGIN_BOUND_CERT, |
| 262 STATE_SEND_ORIGIN_BOUND_CERT_COMPLETE, | 264 STATE_SEND_ORIGIN_BOUND_CERT_COMPLETE, |
| 263 STATE_SEND_HEADERS, | 265 STATE_SEND_HEADERS, |
| 264 STATE_SEND_HEADERS_COMPLETE, | 266 STATE_SEND_HEADERS_COMPLETE, |
| 265 STATE_SEND_BODY, | 267 STATE_SEND_BODY, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 291 int DoOpen(int result); | 293 int DoOpen(int result); |
| 292 | 294 |
| 293 // Update the histograms. Can safely be called repeatedly, but should only | 295 // Update the histograms. Can safely be called repeatedly, but should only |
| 294 // be called after the stream has completed. | 296 // be called after the stream has completed. |
| 295 void UpdateHistograms(); | 297 void UpdateHistograms(); |
| 296 | 298 |
| 297 // When a server pushed stream is first created, this function is posted on | 299 // When a server pushed stream is first created, this function is posted on |
| 298 // the MessageLoop to replay all the data that the server has already sent. | 300 // the MessageLoop to replay all the data that the server has already sent. |
| 299 void PushedStreamReplayData(); | 301 void PushedStreamReplayData(); |
| 300 | 302 |
| 303 // Extracts the URL from the various fields in |headers|. |
| 304 GURL GetUrlFromHeaderBlock( |
| 305 const linked_ptr<spdy::SpdyHeaderBlock>& headers) const; |
| 306 |
| 301 // There is a small period of time between when a server pushed stream is | 307 // There is a small period of time between when a server pushed stream is |
| 302 // first created, and the pushed data is replayed. Any data received during | 308 // first created, and the pushed data is replayed. Any data received during |
| 303 // this time should continue to be buffered. | 309 // this time should continue to be buffered. |
| 304 bool continue_buffering_data_; | 310 bool continue_buffering_data_; |
| 305 | 311 |
| 306 spdy::SpdyStreamId stream_id_; | 312 spdy::SpdyStreamId stream_id_; |
| 307 std::string path_; | 313 std::string path_; |
| 308 int priority_; | 314 int priority_; |
| 309 | 315 |
| 310 // Flow control variables. | 316 // Flow control variables. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 const spdy::SpdyStreamId stream_id_; | 380 const spdy::SpdyStreamId stream_id_; |
| 375 const int status_; | 381 const int status_; |
| 376 const std::string description_; | 382 const std::string description_; |
| 377 | 383 |
| 378 DISALLOW_COPY_AND_ASSIGN(NetLogSpdyStreamErrorParameter); | 384 DISALLOW_COPY_AND_ASSIGN(NetLogSpdyStreamErrorParameter); |
| 379 }; | 385 }; |
| 380 | 386 |
| 381 } // namespace net | 387 } // namespace net |
| 382 | 388 |
| 383 #endif // NET_SPDY_SPDY_STREAM_H_ | 389 #endif // NET_SPDY_SPDY_STREAM_H_ |
| OLD | NEW |