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

Side by Side Diff: ios/web/public/test/http_server/data_response_provider.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/data_response_provider.h" 5 #import "ios/web/public/test/http_server/data_response_provider.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
10 namespace web { 14 namespace web {
11 15
12 std::unique_ptr<net::test_server::HttpResponse> 16 std::unique_ptr<net::test_server::HttpResponse>
13 DataResponseProvider::GetEmbeddedTestServerResponse(const Request& request) { 17 DataResponseProvider::GetEmbeddedTestServerResponse(const Request& request) {
14 std::string response_body; 18 std::string response_body;
15 scoped_refptr<net::HttpResponseHeaders> response_headers; 19 scoped_refptr<net::HttpResponseHeaders> response_headers;
16 GetResponseHeadersAndBody(request, &response_headers, &response_body); 20 GetResponseHeadersAndBody(request, &response_headers, &response_body);
17 21
18 std::unique_ptr<net::test_server::BasicHttpResponse> data_response = 22 std::unique_ptr<net::test_server::BasicHttpResponse> data_response =
19 base::MakeUnique<net::test_server::BasicHttpResponse>(); 23 base::MakeUnique<net::test_server::BasicHttpResponse>();
(...skipping 11 matching lines...) Expand all
31 if (name == "Content-type") { 35 if (name == "Content-type") {
32 data_response->set_content_type(value); 36 data_response->set_content_type(value);
33 continue; 37 continue;
34 } 38 }
35 data_response->AddCustomHeader(name, value); 39 data_response->AddCustomHeader(name, value);
36 } 40 }
37 return std::move(data_response); 41 return std::move(data_response);
38 } 42 }
39 43
40 } // namespace web 44 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/http_server/BUILD.gn ('k') | ios/web/public/test/http_server/delayed_response_provider.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698