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 #include "net/websockets/websocket_channel.h" | 5 #include "net/websockets/websocket_channel.h" |
6 | 6 |
| 7 #include <limits.h> // for INT_MAX |
7 #include <stddef.h> | 8 #include <stddef.h> |
8 #include <limits.h> // for INT_MAX | |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <deque> | 11 #include <deque> |
12 #include <utility> | 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/big_endian.h" | 15 #include "base/big_endian.h" |
16 #include "base/bind.h" | 16 #include "base/bind.h" |
17 #include "base/location.h" | 17 #include "base/location.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
21 #include "base/metrics/histogram_macros.h" | 21 #include "base/metrics/histogram_macros.h" |
22 #include "base/numerics/safe_conversions.h" | 22 #include "base/numerics/safe_conversions.h" |
23 #include "base/single_thread_task_runner.h" | 23 #include "base/single_thread_task_runner.h" |
24 #include "base/strings/stringprintf.h" | 24 #include "base/strings/stringprintf.h" |
25 #include "base/thread_task_runner_handle.h" | 25 #include "base/threading/thread_task_runner_handle.h" |
26 #include "base/time/time.h" | 26 #include "base/time/time.h" |
27 #include "net/base/io_buffer.h" | 27 #include "net/base/io_buffer.h" |
28 #include "net/http/http_request_headers.h" | 28 #include "net/http/http_request_headers.h" |
29 #include "net/http/http_response_headers.h" | 29 #include "net/http/http_response_headers.h" |
30 #include "net/http/http_util.h" | 30 #include "net/http/http_util.h" |
31 #include "net/log/net_log.h" | 31 #include "net/log/net_log.h" |
32 #include "net/websockets/websocket_errors.h" | 32 #include "net/websockets/websocket_errors.h" |
33 #include "net/websockets/websocket_event_interface.h" | 33 #include "net/websockets/websocket_event_interface.h" |
34 #include "net/websockets/websocket_frame.h" | 34 #include "net/websockets/websocket_frame.h" |
35 #include "net/websockets/websocket_handshake_request_info.h" | 35 #include "net/websockets/websocket_handshake_request_info.h" |
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 } | 1172 } |
1173 | 1173 |
1174 void WebSocketChannel::CloseTimeout() { | 1174 void WebSocketChannel::CloseTimeout() { |
1175 stream_->Close(); | 1175 stream_->Close(); |
1176 SetState(CLOSED); | 1176 SetState(CLOSED); |
1177 DoDropChannel(false, kWebSocketErrorAbnormalClosure, ""); | 1177 DoDropChannel(false, kWebSocketErrorAbnormalClosure, ""); |
1178 // |this| has been deleted. | 1178 // |this| has been deleted. |
1179 } | 1179 } |
1180 | 1180 |
1181 } // namespace net | 1181 } // namespace net |
OLD | NEW |