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

Side by Side Diff: ios/web/public/test/http_server/error_page_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/error_page_response_provider.h" 5 #import "ios/web/public/test/http_server/error_page_response_provider.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "ios/web/public/test/http_server/http_server.h" 8 #import "ios/web/public/test/http_server/http_server.h"
9 #include "net/http/http_status_code.h" 9 #include "net/http/http_status_code.h"
10 10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
11 // static 15 // static
12 GURL ErrorPageResponseProvider::GetDnsFailureUrl() { 16 GURL ErrorPageResponseProvider::GetDnsFailureUrl() {
13 return GURL("http://mock/bad"); 17 return GURL("http://mock/bad");
14 } 18 }
15 19
16 // static 20 // static
17 GURL ErrorPageResponseProvider::GetRedirectToDnsFailureUrl() { 21 GURL ErrorPageResponseProvider::GetRedirectToDnsFailureUrl() {
18 return web::test::HttpServer::MakeUrl("http://mock/redirect"); 22 return web::test::HttpServer::MakeUrl("http://mock/redirect");
19 } 23 }
20 24
(...skipping 11 matching lines...) Expand all
32 if (HtmlResponseProvider::CanHandleRequest(request)) { 36 if (HtmlResponseProvider::CanHandleRequest(request)) {
33 HtmlResponseProvider::GetResponseHeadersAndBody(request, headers, 37 HtmlResponseProvider::GetResponseHeadersAndBody(request, headers,
34 response_body); 38 response_body);
35 } else if (request.url == GetRedirectToDnsFailureUrl()) { 39 } else if (request.url == GetRedirectToDnsFailureUrl()) {
36 *headers = web::ResponseProvider::GetRedirectResponseHeaders( 40 *headers = web::ResponseProvider::GetRedirectResponseHeaders(
37 ErrorPageResponseProvider::GetDnsFailureUrl().spec(), net::HTTP_FOUND); 41 ErrorPageResponseProvider::GetDnsFailureUrl().spec(), net::HTTP_FOUND);
38 } else { 42 } else {
39 NOTREACHED(); 43 NOTREACHED();
40 } 44 }
41 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698