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

Side by Side Diff: net/quic/crypto/quic_crypto_client_config.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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_server_properties_impl.cc ('k') | net/server/http_server_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/quic/crypto/quic_crypto_client_config.h" 5 #include "net/quic/crypto/quic_crypto_client_config.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 void QuicCryptoClientConfig::DisableEcdsa() { 897 void QuicCryptoClientConfig::DisableEcdsa() {
898 disable_ecdsa_ = true; 898 disable_ecdsa_ = true;
899 } 899 }
900 900
901 bool QuicCryptoClientConfig::PopulateFromCanonicalConfig( 901 bool QuicCryptoClientConfig::PopulateFromCanonicalConfig(
902 const QuicServerId& server_id, 902 const QuicServerId& server_id,
903 CachedState* server_state) { 903 CachedState* server_state) {
904 DCHECK(server_state->IsEmpty()); 904 DCHECK(server_state->IsEmpty());
905 size_t i = 0; 905 size_t i = 0;
906 for (; i < canonical_suffixes_.size(); ++i) { 906 for (; i < canonical_suffixes_.size(); ++i) {
907 if (EndsWith(server_id.host(), canonical_suffixes_[i], false)) { 907 if (base::EndsWith(server_id.host(), canonical_suffixes_[i], false)) {
908 break; 908 break;
909 } 909 }
910 } 910 }
911 if (i == canonical_suffixes_.size()) { 911 if (i == canonical_suffixes_.size()) {
912 return false; 912 return false;
913 } 913 }
914 914
915 QuicServerId suffix_server_id(canonical_suffixes_[i], server_id.port(), 915 QuicServerId suffix_server_id(canonical_suffixes_[i], server_id.port(),
916 server_id.is_https(), 916 server_id.is_https(),
917 server_id.privacy_mode()); 917 server_id.privacy_mode());
(...skipping 12 matching lines...) Expand all
930 } 930 }
931 931
932 // Update canonical version to point at the "most recent" entry. 932 // Update canonical version to point at the "most recent" entry.
933 canonical_server_map_[suffix_server_id] = server_id; 933 canonical_server_map_[suffix_server_id] = server_id;
934 934
935 server_state->InitializeFrom(*canonical_state); 935 server_state->InitializeFrom(*canonical_state);
936 return true; 936 return true;
937 } 937 }
938 938
939 } // namespace net 939 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/server/http_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698