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