droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #import "ios/net/crn_http_url_response.h" |
| 6 | |
droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 7 | |
stkhapugin | d335d77 | 2016-11-16 16:48:45 | [diff] [blame] | 8 | #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 9 | #error "This file requires ARC support." |
| 10 | #endif |
| 11 | |
droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 12 | @interface CRNHTTPURLResponse () { |
[email protected] | 3984619 | 2017-12-29 13:03:52 | [diff] [blame] | 13 | NSString* _cr_HTTPVersion; |
droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 14 | } |
| 15 | @end |
| 16 | |
| 17 | @implementation CRNHTTPURLResponse |
| 18 | |
| 19 | - (NSString*)cr_HTTPVersion { |
| 20 | return _cr_HTTPVersion; |
| 21 | } |
| 22 | |
| 23 | - (instancetype)initWithURL:(NSURL*)url |
| 24 | statusCode:(NSInteger)statusCode |
| 25 | HTTPVersion:(NSString*)HTTPVersion |
| 26 | headerFields:(NSDictionary*)headerFields { |
| 27 | self = [super initWithURL:url |
| 28 | statusCode:statusCode |
| 29 | HTTPVersion:HTTPVersion |
| 30 | headerFields:headerFields]; |
| 31 | if (self) { |
[email protected] | 3984619 | 2017-12-29 13:03:52 | [diff] [blame] | 32 | _cr_HTTPVersion = [HTTPVersion copy]; |
droger | 476922e0 | 2015-03-10 17:17:52 | [diff] [blame] | 33 | } |
| 34 | return self; |
| 35 | } |
| 36 | |
| 37 | @end |