OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/socket/web_socket_server_socket.h" | 5 #include "net/socket/web_socket_server_socket.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
14 #include "base/string_util.h" | 15 #include "base/string_util.h" |
15 #include "base/task.h" | |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "net/base/io_buffer.h" | 17 #include "net/base/io_buffer.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char* kSampleHandshakeRequest[] = { | 23 const char* kSampleHandshakeRequest[] = { |
24 "GET /demo HTTP/1.1", | 24 "GET /demo HTTP/1.1", |
25 "Upgrade: WebSocket", | 25 "Upgrade: WebSocket", |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 MessageLoop::current()->RunAllPending(); | 586 MessageLoop::current()->RunAllPending(); |
587 | 587 |
588 for (size_t i = kill_list.size(); i--;) | 588 for (size_t i = kill_list.size(); i--;) |
589 delete kill_list[i]; | 589 delete kill_list[i]; |
590 for (size_t i = tracker_list.size(); i--;) | 590 for (size_t i = tracker_list.size(); i--;) |
591 delete tracker_list[i]; | 591 delete tracker_list[i]; |
592 MessageLoop::current()->RunAllPending(); | 592 MessageLoop::current()->RunAllPending(); |
593 } | 593 } |
594 | 594 |
595 } // namespace net | 595 } // namespace net |
OLD | NEW |