OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ios/web/public/test/http_server.h" | 5 #import "ios/web/public/test/http_server.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
14 #import "net/base/mac/url_conversions.h" | |
15 #import "ios/third_party/gcdwebserver/src/GCDWebServer/Core/GCDWebServer.h" | 14 #import "ios/third_party/gcdwebserver/src/GCDWebServer/Core/GCDWebServer.h" |
16 #import "ios/third_party/gcdwebserver/src/GCDWebServer/Core/GCDWebServerResponse
.h" | 15 #import "ios/third_party/gcdwebserver/src/GCDWebServer/Core/GCDWebServerResponse
.h" |
17 #import "ios/third_party/gcdwebserver/src/GCDWebServer/Requests/GCDWebServerData
Request.h" | 16 #import "ios/third_party/gcdwebserver/src/GCDWebServer/Requests/GCDWebServerData
Request.h" |
| 17 #import "net/base/mac/url_conversions.h" |
18 | 18 |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // The default port on which the GCDWebServer is brought up on. | 23 // The default port on which the GCDWebServer is brought up on. |
24 const NSUInteger kDefaultPort = 8080; | 24 const NSUInteger kDefaultPort = 8080; |
25 | 25 |
26 // Converts a GCDWebServerDataRequest (received from the GCDWebServer servlet) | 26 // Converts a GCDWebServerDataRequest (received from the GCDWebServer servlet) |
27 // to a request object that the ResponseProvider expects. | 27 // to a request object that the ResponseProvider expects. |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 port_ = port; | 230 port_ = port; |
231 } | 231 } |
232 | 232 |
233 NSUInteger HttpServer::GetPort() const { | 233 NSUInteger HttpServer::GetPort() const { |
234 base::AutoLock autolock(port_lock_); | 234 base::AutoLock autolock(port_lock_); |
235 return port_; | 235 return port_; |
236 } | 236 } |
237 | 237 |
238 } // namespace test | 238 } // namespace test |
239 } // namespace web | 239 } // namespace web |
OLD | NEW |