| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tools/fetch/http_listen_socket.h" | |
| 6 | |
| 7 #include <map> | |
| 8 | |
| 9 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 6 #include "base/logging.h" |
| 11 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 12 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "net/tools/fetch/http_listen_socket.h" |
| 13 #include "net/tools/fetch/http_server_request_info.h" | 10 #include "net/tools/fetch/http_server_request_info.h" |
| 14 #include "net/tools/fetch/http_server_response_info.h" | 11 #include "net/tools/fetch/http_server_response_info.h" |
| 15 | 12 |
| 16 // must run in the IO thread | 13 // must run in the IO thread |
| 17 HttpListenSocket::HttpListenSocket(SOCKET s, | 14 HttpListenSocket::HttpListenSocket(SOCKET s, |
| 18 HttpListenSocket::Delegate* delegate) | 15 HttpListenSocket::Delegate* delegate) |
| 19 : ALLOW_THIS_IN_INITIALIZER_LIST(ListenSocket(s, this)), | 16 : ALLOW_THIS_IN_INITIALIZER_LIST(ListenSocket(s, this)), |
| 20 delegate_(delegate) { | 17 delegate_(delegate) { |
| 21 } | 18 } |
| 22 | 19 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 234 |
| 238 // End of headers | 235 // End of headers |
| 239 response += "\r\n"; | 236 response += "\r\n"; |
| 240 | 237 |
| 241 // Add data | 238 // Add data |
| 242 response += data; | 239 response += data; |
| 243 | 240 |
| 244 // Write it all out. | 241 // Write it all out. |
| 245 this->Send(response, false); | 242 this->Send(response, false); |
| 246 } | 243 } |
| OLD | NEW |