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

Side by Side Diff: ios/net/http_response_headers_util.mm

Issue 2489533003: [ObjC ARC] Converts ios/net to ARC. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « ios/net/http_protocol_logging.mm ('k') | ios/net/nsurlrequest_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ios/net/http_response_headers_util.h" 5 #include "ios/net/http_response_headers_util.h"
6 6
7 #include <Foundation/Foundation.h> 7 #include <Foundation/Foundation.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
12 #include "net/http/http_util.h" 12 #include "net/http/http_util.h"
13 13
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
14 namespace { 18 namespace {
15 // String format used to create the http status line from the status code and 19 // String format used to create the http status line from the status code and
16 // its localized description. 20 // its localized description.
17 NSString* const kHttpStatusLineFormat = @"HTTP %ld %s"; 21 NSString* const kHttpStatusLineFormat = @"HTTP %ld %s";
18 // String format used to pass the header name/value pairs to the 22 // String format used to pass the header name/value pairs to the
19 // HttpResponseHeaders. 23 // HttpResponseHeaders.
20 const char kHeaderLineFormat[] = "%s: %s"; 24 const char kHeaderLineFormat[] = "%s: %s";
21 } 25 }
22 26
23 namespace net { 27 namespace net {
(...skipping 21 matching lines...) Expand all
45 std::string header_line = 49 std::string header_line =
46 base::StringPrintf(kHeaderLineFormat, header_name.c_str(), 50 base::StringPrintf(kHeaderLineFormat, header_name.c_str(),
47 header_value.c_str()); 51 header_value.c_str());
48 http_headers->AddHeader(header_line); 52 http_headers->AddHeader(header_line);
49 } 53 }
50 }]; 54 }];
51 return http_headers; 55 return http_headers;
52 } 56 }
53 57
54 } // namespae net 58 } // namespae net
OLDNEW
« no previous file with comments | « ios/net/http_protocol_logging.mm ('k') | ios/net/nsurlrequest_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698