| 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 "platform/weborigin/KURL.h" |
| 9 #include "wtf/text/StringImpl.h" | 9 #include "platform/wtf/text/StringImpl.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 // 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. |
| 14 static const int kMaxiumStringLength = 2048; | 14 static const int kMaxiumStringLength = 2048; |
| 15 | 15 |
| 16 bool PaymentsValidators::IsValidCurrencyCodeFormat( | 16 bool PaymentsValidators::IsValidCurrencyCodeFormat( |
| 17 const String& code, | 17 const String& code, |
| 18 const String& system, | 18 const String& system, |
| 19 String* optional_error_message) { | 19 String* optional_error_message) { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 return true; | 134 return true; |
| 135 | 135 |
| 136 if (optional_error_message) | 136 if (optional_error_message) |
| 137 *optional_error_message = | 137 *optional_error_message = |
| 138 "Error message should be at most 2048 characters long"; | 138 "Error message should be at most 2048 characters long"; |
| 139 | 139 |
| 140 return false; | 140 return false; |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace blink | 143 } // namespace blink |
| OLD | NEW |