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

Side by Side Diff: ios/chrome/browser/chrome_url_util.mm

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « google_apis/gcm/engine/gservices_settings.cc ('k') | media/base/mime_util.cc » ('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 #import "ios/chrome/browser/chrome_url_util.h" 5 #import "ios/chrome/browser/chrome_url_util.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_block.h" 10 #include "base/mac/scoped_block.h"
(...skipping 29 matching lines...) Expand all
40 return url.SchemeIs(ios::GetChromeBrowserProvider()->GetChromeUIScheme()); 40 return url.SchemeIs(ios::GetChromeBrowserProvider()->GetChromeUIScheme());
41 } 41 }
42 42
43 bool UrlHasChromeScheme(NSURL* url) { 43 bool UrlHasChromeScheme(NSURL* url) {
44 return net::UrlSchemeIs( 44 return net::UrlSchemeIs(
45 url, base::SysUTF8ToNSString( 45 url, base::SysUTF8ToNSString(
46 ios::GetChromeBrowserProvider()->GetChromeUIScheme())); 46 ios::GetChromeBrowserProvider()->GetChromeUIScheme()));
47 } 47 }
48 48
49 bool IsHandledProtocol(const std::string& scheme) { 49 bool IsHandledProtocol(const std::string& scheme) {
50 DCHECK_EQ(scheme, base::StringToLowerASCII(scheme)); 50 DCHECK_EQ(scheme, base::ToLowerASCII(scheme));
51 if (scheme == url::kAboutScheme) 51 if (scheme == url::kAboutScheme)
52 return true; 52 return true;
53 if (scheme == url::kDataScheme) 53 if (scheme == url::kDataScheme)
54 return true; 54 return true;
55 if (scheme == ios::GetChromeBrowserProvider()->GetChromeUIScheme()) 55 if (scheme == ios::GetChromeBrowserProvider()->GetChromeUIScheme())
56 return true; 56 return true;
57 return net::URLRequest::IsHandledProtocol(scheme); 57 return net::URLRequest::IsHandledProtocol(scheme);
58 } 58 }
59 59
60 @implementation ChromeAppConstants { 60 @implementation ChromeAppConstants {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 - (void)setCallbackSchemeForTesting:(NSString*)scheme { 107 - (void)setCallbackSchemeForTesting:(NSString*)scheme {
108 _callbackScheme.reset([scheme copy]); 108 _callbackScheme.reset([scheme copy]);
109 } 109 }
110 110
111 - (void)setAppIconURLProviderForTesting:(AppIconURLProvider)block { 111 - (void)setAppIconURLProviderForTesting:(AppIconURLProvider)block {
112 _appIconURLProvider.reset(block, base::scoped_policy::RETAIN); 112 _appIconURLProvider.reset(block, base::scoped_policy::RETAIN);
113 } 113 }
114 114
115 @end 115 @end
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/gservices_settings.cc ('k') | media/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698