| 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 "chrome/browser/google_apis/test_server/http_server.h" | 5 #include "net/test/embedded_test_server/http_server.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
| 12 #include "chrome/browser/google_apis/test_server/http_connection.h" | 12 #include "net/test/embedded_test_server/http_connection.h" |
| 13 #include "chrome/browser/google_apis/test_server/http_request.h" | 13 #include "net/test/embedded_test_server/http_request.h" |
| 14 #include "chrome/browser/google_apis/test_server/http_response.h" | 14 #include "net/test/embedded_test_server/http_response.h" |
| 15 #include "net/tools/fetch/http_listen_socket.h" | 15 #include "net/tools/fetch/http_listen_socket.h" |
| 16 | 16 |
| 17 namespace google_apis { | 17 namespace google_apis { |
| 18 namespace test_server { | 18 namespace test_server { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 const int kPort = 8040; | 22 const int kPort = 8040; |
| 23 const char kIp[] = "127.0.0.1"; | 23 const char kIp[] = "127.0.0.1"; |
| 24 const int kRetries = 10; | 24 const int kRetries = 10; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 std::map<net::StreamListenSocket*, HttpConnection*>::iterator it = | 204 std::map<net::StreamListenSocket*, HttpConnection*>::iterator it = |
| 205 connections_.find(socket); | 205 connections_.find(socket); |
| 206 if (it == connections_.end()) { | 206 if (it == connections_.end()) { |
| 207 return NULL; | 207 return NULL; |
| 208 } | 208 } |
| 209 return it->second; | 209 return it->second; |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace test_server | 212 } // namespace test_server |
| 213 } // namespace google_apis | 213 } // namespace google_apis |
| OLD | NEW |