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

Side by Side Diff: ios/net/http_protocol_logging.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/empty_nsurlcache.mm ('k') | ios/net/http_response_headers_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_protocol_logging.h" 5 #include "ios/net/http_protocol_logging.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/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
11 #import "ios/net/url_scheme_util.h" 11 #import "ios/net/url_scheme_util.h"
12 12
13 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support."
15 #endif
16
13 namespace { 17 namespace {
14 const unsigned int kMaxUrlLength = 100; 18 const unsigned int kMaxUrlLength = 100;
15 } 19 }
16 20
17 namespace net { 21 namespace net {
18 22
19 void LogNSURLRequest(NSURLRequest* request) { 23 void LogNSURLRequest(NSURLRequest* request) {
20 DVLOG_IF(2, UrlHasDataScheme([request URL]) && 24 DVLOG_IF(2, UrlHasDataScheme([request URL]) &&
21 [[[request URL] absoluteString] length] > kMaxUrlLength) 25 [[[request URL] absoluteString] length] > kMaxUrlLength)
22 << "Request (data scheme) " 26 << "Request (data scheme) "
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 72
69 DVLOG_IF(2, [response isKindOfClass:[NSHTTPURLResponse class]]) 73 DVLOG_IF(2, [response isKindOfClass:[NSHTTPURLResponse class]])
70 << "Response code: " << [(NSHTTPURLResponse*)response statusCode]; 74 << "Response code: " << [(NSHTTPURLResponse*)response statusCode];
71 75
72 DVLOG_IF(2, [response textEncodingName]) 76 DVLOG_IF(2, [response textEncodingName])
73 << "Text encoding: " 77 << "Text encoding: "
74 << base::SysNSStringToUTF8([response textEncodingName]); 78 << base::SysNSStringToUTF8([response textEncodingName]);
75 } 79 }
76 80
77 } // namespace http_protocol_logging 81 } // namespace http_protocol_logging
OLDNEW
« no previous file with comments | « ios/net/empty_nsurlcache.mm ('k') | ios/net/http_response_headers_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698