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

Side by Side Diff: ios/web/public/test/http_server/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 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/response_provider.h" 5 #import "ios/web/public/test/http_server/response_provider.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "net/http/http_response_headers.h" 8 #include "net/http/http_response_headers.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 ResponseProvider::Request::Request(const GURL& url, 16 ResponseProvider::Request::Request(const GURL& url,
13 const std::string& method, 17 const std::string& method,
14 const std::string& body, 18 const std::string& body,
15 const net::HttpRequestHeaders& headers) 19 const net::HttpRequestHeaders& headers)
16 : url(url), method(method), body(body), headers(headers) {} 20 : url(url), method(method), body(body), headers(headers) {}
17 21
18 ResponseProvider::Request::Request(const Request& other) = default; 22 ResponseProvider::Request::Request(const Request& other) = default;
19 23
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 ResponseProvider::GetRedirectResponseHeaders( 75 ResponseProvider::GetRedirectResponseHeaders(
72 const std::string& destination, 76 const std::string& destination,
73 const net::HttpStatusCode& http_status) { 77 const net::HttpStatusCode& http_status) {
74 scoped_refptr<net::HttpResponseHeaders> headers( 78 scoped_refptr<net::HttpResponseHeaders> headers(
75 GetResponseHeaders("text/html", http_status)); 79 GetResponseHeaders("text/html", http_status));
76 headers->AddHeader("Location: " + destination); 80 headers->AddHeader("Location: " + destination);
77 return headers; 81 return headers;
78 } 82 }
79 83
80 } // namespace web 84 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/http_server/http_server_util.mm ('k') | ios/web/public/test/http_server/string_response_provider.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698