OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ | 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ |
6 #define NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ | 6 #define NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 // Timer for the closing handshake. | 373 // Timer for the closing handshake. |
374 base::OneShotTimer<WebSocketChannel> timer_; | 374 base::OneShotTimer<WebSocketChannel> timer_; |
375 | 375 |
376 // Timeout for the closing handshake. | 376 // Timeout for the closing handshake. |
377 base::TimeDelta timeout_; | 377 base::TimeDelta timeout_; |
378 | 378 |
379 // Storage for the status code and reason from the time the Close frame | 379 // Storage for the status code and reason from the time the Close frame |
380 // arrives until the connection is closed and they are passed to | 380 // arrives until the connection is closed and they are passed to |
381 // OnDropChannel(). | 381 // OnDropChannel(). |
| 382 bool has_received_close_frame_; |
382 uint16 received_close_code_; | 383 uint16 received_close_code_; |
383 std::string received_close_reason_; | 384 std::string received_close_reason_; |
384 | 385 |
385 // The current state of the channel. Mainly used for sanity checking, but also | 386 // The current state of the channel. Mainly used for sanity checking, but also |
386 // used to track the close state. | 387 // used to track the close state. |
387 State state_; | 388 State state_; |
388 | 389 |
389 // |notification_sender_| is owned by this object. | 390 // |notification_sender_| is owned by this object. |
390 scoped_ptr<HandshakeNotificationSender> notification_sender_; | 391 scoped_ptr<HandshakeNotificationSender> notification_sender_; |
391 | 392 |
(...skipping 15 matching lines...) Expand all Loading... |
407 // For UMA. The time when OnConnectSuccess() method was called and |stream_| | 408 // For UMA. The time when OnConnectSuccess() method was called and |stream_| |
408 // was set. | 409 // was set. |
409 base::TimeTicks established_on_; | 410 base::TimeTicks established_on_; |
410 | 411 |
411 DISALLOW_COPY_AND_ASSIGN(WebSocketChannel); | 412 DISALLOW_COPY_AND_ASSIGN(WebSocketChannel); |
412 }; | 413 }; |
413 | 414 |
414 } // namespace net | 415 } // namespace net |
415 | 416 |
416 #endif // NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ | 417 #endif // NET_WEBSOCKETS_WEBSOCKET_CHANNEL_H_ |
OLD | NEW |