| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/payments/PaymentsValidators.h" | 5 #include "modules/payments/PaymentsValidators.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptRegexp.h" | 7 #include "bindings/core/v8/ScriptRegexp.h" |
| 8 #include "platform/weborigin/KURL.h" |
| 8 #include "wtf/text/StringImpl.h" | 9 #include "wtf/text/StringImpl.h" |
| 9 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 | 12 |
| 12 // We limit the maximum length of string to 2048 bytes for security reasons. | 13 // We limit the maximum length of string to 2048 bytes for security reasons. |
| 13 static const int maxiumStringLength = 2048; | 14 static const int maxiumStringLength = 2048; |
| 14 | 15 |
| 15 bool PaymentsValidators::isValidCurrencyCodeFormat( | 16 bool PaymentsValidators::isValidCurrencyCodeFormat( |
| 16 const String& code, | 17 const String& code, |
| 17 const String& system, | 18 const String& system, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return true; | 129 return true; |
| 129 | 130 |
| 130 if (optionalErrorMessage) | 131 if (optionalErrorMessage) |
| 131 *optionalErrorMessage = | 132 *optionalErrorMessage = |
| 132 "Error message should be at most 2048 characters long"; | 133 "Error message should be at most 2048 characters long"; |
| 133 | 134 |
| 134 return false; | 135 return false; |
| 135 } | 136 } |
| 136 | 137 |
| 137 } // namespace blink | 138 } // namespace blink |
| OLD | NEW |