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 <stddef.h> | 7 #include <stddef.h> |
8 #include <limits.h> // for INT_MAX | 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/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
19 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
20 #include "base/metrics/histogram_macros.h" | 21 #include "base/metrics/histogram_macros.h" |
21 #include "base/numerics/safe_conversions.h" | 22 #include "base/numerics/safe_conversions.h" |
22 #include "base/single_thread_task_runner.h" | 23 #include "base/single_thread_task_runner.h" |
23 #include "base/strings/stringprintf.h" | 24 #include "base/strings/stringprintf.h" |
24 #include "base/thread_task_runner_handle.h" | 25 #include "base/thread_task_runner_handle.h" |
25 #include "base/time/time.h" | 26 #include "base/time/time.h" |
26 #include "net/base/io_buffer.h" | 27 #include "net/base/io_buffer.h" |
27 #include "net/http/http_request_headers.h" | 28 #include "net/http/http_request_headers.h" |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 } | 1144 } |
1144 | 1145 |
1145 void WebSocketChannel::CloseTimeout() { | 1146 void WebSocketChannel::CloseTimeout() { |
1146 stream_->Close(); | 1147 stream_->Close(); |
1147 SetState(CLOSED); | 1148 SetState(CLOSED); |
1148 DoDropChannel(false, kWebSocketErrorAbnormalClosure, ""); | 1149 DoDropChannel(false, kWebSocketErrorAbnormalClosure, ""); |
1149 // |this| has been deleted. | 1150 // |this| has been deleted. |
1150 } | 1151 } |
1151 | 1152 |
1152 } // namespace net | 1153 } // namespace net |
OLD | NEW |