OLD | NEW |
(Empty) | |
| 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 |
| 7 #include "base/mac/scoped_nsobject.h" |
| 8 |
| 9 @interface CRNHTTPURLResponse () { |
| 10 base::scoped_nsobject<NSString> _cr_HTTPVersion; |
| 11 } |
| 12 @end |
| 13 |
| 14 @implementation CRNHTTPURLResponse |
| 15 |
| 16 - (NSString*)cr_HTTPVersion { |
| 17 return _cr_HTTPVersion; |
| 18 } |
| 19 |
| 20 - (instancetype)initWithURL:(NSURL*)url |
| 21 statusCode:(NSInteger)statusCode |
| 22 HTTPVersion:(NSString*)HTTPVersion |
| 23 headerFields:(NSDictionary*)headerFields { |
| 24 self = [super initWithURL:url |
| 25 statusCode:statusCode |
| 26 HTTPVersion:HTTPVersion |
| 27 headerFields:headerFields]; |
| 28 if (self) { |
| 29 _cr_HTTPVersion.reset([HTTPVersion copy]); |
| 30 } |
| 31 return self; |
| 32 } |
| 33 |
| 34 @end |
OLD | NEW |