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

Side by Side Diff: net/http/transport_security_state.cc

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 | « net/http/http_util.cc ('k') | net/proxy/proxy_bypass_rules.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "net/http/transport_security_state.h" 5 #include "net/http/transport_security_state.h"
6 6
7 #if defined(USE_OPENSSL) 7 #if defined(USE_OPENSSL)
8 #include <openssl/ecdsa.h> 8 #include <openssl/ecdsa.h>
9 #include <openssl/ssl.h> 9 #include <openssl/ssl.h>
10 #else // !defined(USE_OPENSSL) 10 #else // !defined(USE_OPENSSL)
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 size_t found = hostname.find_last_not_of('.'); 426 size_t found = hostname.find_last_not_of('.');
427 if (found != std::string::npos) { 427 if (found != std::string::npos) {
428 hostname.erase(found + 1); 428 hostname.erase(found + 1);
429 } else { 429 } else {
430 hostname.clear(); 430 hostname.clear();
431 } 431 }
432 432
433 // |hostname| has already undergone IDN conversion, so should be 433 // |hostname| has already undergone IDN conversion, so should be
434 // entirely A-Labels. The preload data is entirely normalized to 434 // entirely A-Labels. The preload data is entirely normalized to
435 // lower case. 435 // lower case.
436 base::StringToLowerASCII(&hostname); 436 hostname = base::ToLowerASCII(hostname);
437
438 if (hostname.empty()) { 437 if (hostname.empty()) {
439 return true; 438 return true;
440 } 439 }
441 440
442 // hostname_offset contains one more than the index of the current character 441 // hostname_offset contains one more than the index of the current character
443 // in the hostname that is being considered. It's one greater so that we can 442 // in the hostname that is being considered. It's one greater so that we can
444 // represent the position just before the beginning (with zero). 443 // represent the position just before the beginning (with zero).
445 size_t hostname_offset = hostname.size(); 444 size_t hostname_offset = hostname.size();
446 445
447 for (;;) { 446 for (;;) {
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 TransportSecurityState::PKPStateIterator::PKPStateIterator( 1225 TransportSecurityState::PKPStateIterator::PKPStateIterator(
1227 const TransportSecurityState& state) 1226 const TransportSecurityState& state)
1228 : iterator_(state.enabled_pkp_hosts_.begin()), 1227 : iterator_(state.enabled_pkp_hosts_.begin()),
1229 end_(state.enabled_pkp_hosts_.end()) { 1228 end_(state.enabled_pkp_hosts_.end()) {
1230 } 1229 }
1231 1230
1232 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { 1231 TransportSecurityState::PKPStateIterator::~PKPStateIterator() {
1233 } 1232 }
1234 1233
1235 } // namespace 1234 } // namespace
OLDNEW
« no previous file with comments | « net/http/http_util.cc ('k') | net/proxy/proxy_bypass_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698