| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void IDBParseKeyPath(const String& key_path, | 81 void IDBParseKeyPath(const String& key_path, |
| 82 Vector<String>& elements, | 82 Vector<String>& elements, |
| 83 IDBKeyPathParseError& error) { | 83 IDBKeyPathParseError& error) { |
| 84 // IDBKeyPath ::= EMPTY_STRING | identifier ('.' identifier)* | 84 // IDBKeyPath ::= EMPTY_STRING | identifier ('.' identifier)* |
| 85 | 85 |
| 86 if (key_path.IsEmpty()) { | 86 if (key_path.IsEmpty()) { |
| 87 error = kIDBKeyPathParseErrorNone; | 87 error = kIDBKeyPathParseErrorNone; |
| 88 return; | 88 return; |
| 89 } | 89 } |
| 90 | 90 |
| 91 key_path.Split('.', /*allowEmptyEntries*/ true, elements); | 91 key_path.Split('.', /*allow_empty_entries=*/true, elements); |
| 92 for (size_t i = 0; i < elements.size(); ++i) { | 92 for (size_t i = 0; i < elements.size(); ++i) { |
| 93 if (!IsIdentifier(elements[i])) { | 93 if (!IsIdentifier(elements[i])) { |
| 94 error = kIDBKeyPathParseErrorIdentifier; | 94 error = kIDBKeyPathParseErrorIdentifier; |
| 95 return; | 95 return; |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 error = kIDBKeyPathParseErrorNone; | 98 error = kIDBKeyPathParseErrorNone; |
| 99 } | 99 } |
| 100 | 100 |
| 101 IDBKeyPath::IDBKeyPath(const String& string) | 101 IDBKeyPath::IDBKeyPath(const String& string) |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 case kStringType: | 193 case kStringType: |
| 194 return string_ == other.string_; | 194 return string_ == other.string_; |
| 195 case kArrayType: | 195 case kArrayType: |
| 196 return array_ == other.array_; | 196 return array_ == other.array_; |
| 197 } | 197 } |
| 198 NOTREACHED(); | 198 NOTREACHED(); |
| 199 return false; | 199 return false; |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace blink | 202 } // namespace blink |
| OLD | NEW |