| OLD | NEW |
| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 173 |
| 174 return false; | 174 return false; |
| 175 } | 175 } |
| 176 | 176 |
| 177 bool LookupAlgorithmIdByName(const String& algorithm_name, | 177 bool LookupAlgorithmIdByName(const String& algorithm_name, |
| 178 WebCryptoAlgorithmId& id) { | 178 WebCryptoAlgorithmId& id) { |
| 179 const AlgorithmNameMapping* begin = kAlgorithmNameMappings; | 179 const AlgorithmNameMapping* begin = kAlgorithmNameMappings; |
| 180 const AlgorithmNameMapping* end = | 180 const AlgorithmNameMapping* end = |
| 181 kAlgorithmNameMappings + WTF_ARRAY_LENGTH(kAlgorithmNameMappings); | 181 kAlgorithmNameMappings + WTF_ARRAY_LENGTH(kAlgorithmNameMappings); |
| 182 | 182 |
| 183 ASSERT(VerifyAlgorithmNameMappings(begin, end)); | 183 DCHECK(VerifyAlgorithmNameMappings(begin, end)); |
| 184 | 184 |
| 185 const AlgorithmNameMapping* it; | 185 const AlgorithmNameMapping* it; |
| 186 if (algorithm_name.Impl()->Is8Bit()) | 186 if (algorithm_name.Impl()->Is8Bit()) |
| 187 it = std::lower_bound(begin, end, algorithm_name.Impl(), | 187 it = std::lower_bound(begin, end, algorithm_name.Impl(), |
| 188 &AlgorithmNameComparator<LChar>); | 188 &AlgorithmNameComparator<LChar>); |
| 189 else | 189 else |
| 190 it = std::lower_bound(begin, end, algorithm_name.Impl(), | 190 it = std::lower_bound(begin, end, algorithm_name.Impl(), |
| 191 &AlgorithmNameComparator<UChar>); | 191 &AlgorithmNameComparator<UChar>); |
| 192 | 192 |
| 193 if (it == end) | 193 if (it == end) |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |