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

Side by Side Diff: ios/web/net/web_http_protocol_handler_delegate.mm

Issue 2247303009: Converts ios/web/net to ARC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-web
Patch Set: Removes web_arc_transition temporary target Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 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 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/web/net/web_http_protocol_handler_delegate.h" 5 #include "ios/web/net/web_http_protocol_handler_delegate.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #import "ios/web/public/url_scheme_util.h" 9 #import "ios/web/public/url_scheme_util.h"
10 #include "ios/web/public/web_client.h" 10 #include "ios/web/public/web_client.h"
11 #include "net/url_request/url_request_context_getter.h" 11 #include "net/url_request/url_request_context_getter.h"
12 #include "url/gurl.h" 12 #include "url/gurl.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 19
16 bool IsAppSpecificScheme(NSURL* url) { 20 bool IsAppSpecificScheme(NSURL* url) {
17 NSString* scheme = [url scheme]; 21 NSString* scheme = [url scheme];
18 if (![scheme length]) 22 if (![scheme length])
19 return false; 23 return false;
20 // Use the GURL implementation, but with a scheme-only URL to avoid 24 // Use the GURL implementation, but with a scheme-only URL to avoid
21 // unnecessary parsing in GURL construction. 25 // unnecessary parsing in GURL construction.
22 GURL gurl([[scheme stringByAppendingString:@":"] UTF8String]); 26 GURL gurl([[scheme stringByAppendingString:@":"] UTF8String]);
23 return web::GetWebClient()->IsAppSpecificURL(gurl); 27 return web::GetWebClient()->IsAppSpecificURL(gurl);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 (IsAppSpecificScheme([request URL]) && 66 (IsAppSpecificScheme([request URL]) &&
63 IsAppSpecificScheme([request mainDocumentURL])); 67 IsAppSpecificScheme([request mainDocumentURL]));
64 } 68 }
65 69
66 net::URLRequestContextGetter* 70 net::URLRequestContextGetter*
67 WebHTTPProtocolHandlerDelegate::GetDefaultURLRequestContext() { 71 WebHTTPProtocolHandlerDelegate::GetDefaultURLRequestContext() {
68 return default_getter_.get(); 72 return default_getter_.get();
69 } 73 }
70 74
71 } // namespace web 75 } // namespace web
OLDNEW
« ios/web/net/clients/crw_js_injection_network_client.mm ('K') | « ios/web/net/request_tracker_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698