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 #include "content/browser/devtools/tethering_handler.h" | 5 #include "content/browser/devtools/tethering_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "content/browser/devtools/devtools_http_handler_impl.h" | 11 #include "content/browser/devtools/devtools_http_handler_impl.h" |
| 12 #include "content/public/browser/devtools_client_host.h" |
12 #include "content/public/browser/devtools_http_handler_delegate.h" | 13 #include "content/public/browser/devtools_http_handler_delegate.h" |
13 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
14 #include "net/base/ip_endpoint.h" | 15 #include "net/base/ip_endpoint.h" |
15 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
16 #include "net/base/net_log.h" | 17 #include "net/base/net_log.h" |
17 #include "net/socket/stream_listen_socket.h" | 18 #include "net/socket/stream_listen_socket.h" |
18 #include "net/socket/stream_socket.h" | 19 #include "net/socket/stream_socket.h" |
19 #include "net/socket/tcp_server_socket.h" | 20 #include "net/socket/tcp_server_socket.h" |
20 | 21 |
21 namespace content { | 22 namespace content { |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 BoundSockets::iterator it = bound_sockets_.find(port); | 299 BoundSockets::iterator it = bound_sockets_.find(port); |
299 if (it == bound_sockets_.end()) | 300 if (it == bound_sockets_.end()) |
300 return command->InternalErrorResponse("Port is not bound"); | 301 return command->InternalErrorResponse("Port is not bound"); |
301 | 302 |
302 delete it->second; | 303 delete it->second; |
303 bound_sockets_.erase(it); | 304 bound_sockets_.erase(it); |
304 return command->SuccessResponse(NULL); | 305 return command->SuccessResponse(NULL); |
305 } | 306 } |
306 | 307 |
307 } // namespace content | 308 } // namespace content |
OLD | NEW |