Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: ios/web/public/test/http_server/http_server.mm

Issue 2923563005: [ObjC ARC] Converts ios/web/public/test/http_server:http_server to ARC. (Closed)
Patch Set: cleanup Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/http_server.h" 5 #import "ios/web/public/test/http_server/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/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/sys_string_conversions.h" 15 #include "base/strings/sys_string_conversions.h"
16 #import "net/base/mac/url_conversions.h" 16 #import "net/base/mac/url_conversions.h"
17 #include "net/test/embedded_test_server/embedded_test_server.h" 17 #include "net/test/embedded_test_server/embedded_test_server.h"
18 #include "net/test/embedded_test_server/http_request.h" 18 #include "net/test/embedded_test_server/http_request.h"
19 #include "net/test/embedded_test_server/http_response.h" 19 #include "net/test/embedded_test_server/http_response.h"
20 20
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 #if !defined(__has_feature) || !__has_feature(objc_arc)
24 #error "This file requires ARC support."
25 #endif
26
23 namespace { 27 namespace {
24 28
25 // Converts a net::test_server::HttpRequest (received from the 29 // Converts a net::test_server::HttpRequest (received from the
26 // EmbeddedTestServer servlet) to a request object that the ResponseProvider 30 // EmbeddedTestServer servlet) to a request object that the ResponseProvider
27 // expects. 31 // expects.
28 web::ResponseProvider::Request 32 web::ResponseProvider::Request
29 ResponseProviderRequestFromEmbeddedTestServerRequest( 33 ResponseProviderRequestFromEmbeddedTestServerRequest(
30 const net::test_server::HttpRequest& request) { 34 const net::test_server::HttpRequest& request) {
31 net::HttpRequestHeaders headers; 35 net::HttpRequestHeaders headers;
32 for (auto it = request.headers.begin(); it != request.headers.end(); ++it) { 36 for (auto it = request.headers.begin(); it != request.headers.end(); ++it) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 providers_.clear(); 216 providers_.clear();
213 } 217 }
214 218
215 void HttpServer::SetPort(NSUInteger port) { 219 void HttpServer::SetPort(NSUInteger port) {
216 base::AutoLock autolock(port_lock_); 220 base::AutoLock autolock(port_lock_);
217 port_ = port; 221 port_ = port;
218 } 222 }
219 223
220 } // namespace test 224 } // namespace test
221 } // namespace web 225 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/http_server/http_server.h ('k') | ios/web/public/test/http_server/http_server_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698