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

Side by Side Diff: third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.cpp

Issue 2821633002: Remove WTF::String::DeprecatedUpper() (Closed)
Patch Set: Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 bool VerifyAlgorithmNameMappings(const AlgorithmNameMapping* begin, 135 bool VerifyAlgorithmNameMappings(const AlgorithmNameMapping* begin,
136 const AlgorithmNameMapping* end) { 136 const AlgorithmNameMapping* end) {
137 for (const AlgorithmNameMapping* it = begin; it != end; ++it) { 137 for (const AlgorithmNameMapping* it = begin; it != end; ++it) {
138 if (it->algorithm_name_length != strlen(it->algorithm_name)) 138 if (it->algorithm_name_length != strlen(it->algorithm_name))
139 return false; 139 return false;
140 String str(it->algorithm_name, it->algorithm_name_length); 140 String str(it->algorithm_name, it->algorithm_name_length);
141 if (!str.ContainsOnlyASCII()) 141 if (!str.ContainsOnlyASCII())
142 return false; 142 return false;
143 if (str.DeprecatedUpper() != str) 143 if (str.UpperASCII() != str)
144 return false; 144 return false;
145 } 145 }
146 146
147 return IsSorted(begin, end); 147 return IsSorted(begin, end);
148 } 148 }
149 #endif 149 #endif
150 150
151 template <typename CharType> 151 template <typename CharType>
152 bool AlgorithmNameComparator(const AlgorithmNameMapping& a, StringImpl* b) { 152 bool AlgorithmNameComparator(const AlgorithmNameMapping& a, StringImpl* b) {
153 if (a.algorithm_name_length < b->length()) 153 if (a.algorithm_name_length < b->length())
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 } // namespace 1093 } // namespace
1094 1094
1095 bool NormalizeAlgorithm(const AlgorithmIdentifier& raw, 1095 bool NormalizeAlgorithm(const AlgorithmIdentifier& raw,
1096 WebCryptoOperation op, 1096 WebCryptoOperation op,
1097 WebCryptoAlgorithm& algorithm, 1097 WebCryptoAlgorithm& algorithm,
1098 AlgorithmError* error) { 1098 AlgorithmError* error) {
1099 return ParseAlgorithmIdentifier(raw, op, algorithm, ErrorContext(), error); 1099 return ParseAlgorithmIdentifier(raw, op, algorithm, ErrorContext(), error);
1100 } 1100 }
1101 1101
1102 } // namespace blink 1102 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698