| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 return; | 137 return; |
| 138 | 138 |
| 139 case WebIDBKeyPathTypeString: | 139 case WebIDBKeyPathTypeString: |
| 140 m_type = StringType; | 140 m_type = StringType; |
| 141 m_string = keyPath.string(); | 141 m_string = keyPath.string(); |
| 142 return; | 142 return; |
| 143 | 143 |
| 144 case WebIDBKeyPathTypeArray: | 144 case WebIDBKeyPathTypeArray: |
| 145 m_type = ArrayType; | 145 m_type = ArrayType; |
| 146 for (size_t i = 0, size = keyPath.array().size(); i < size; ++i) | 146 for (size_t i = 0, size = keyPath.array().size(); i < size; ++i) |
| 147 m_array.append(keyPath.array()[i]); | 147 m_array.push_back(keyPath.array()[i]); |
| 148 return; | 148 return; |
| 149 } | 149 } |
| 150 ASSERT_NOT_REACHED(); | 150 ASSERT_NOT_REACHED(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 IDBKeyPath::operator WebIDBKeyPath() const { | 153 IDBKeyPath::operator WebIDBKeyPath() const { |
| 154 switch (m_type) { | 154 switch (m_type) { |
| 155 case NullType: | 155 case NullType: |
| 156 return WebIDBKeyPath(); | 156 return WebIDBKeyPath(); |
| 157 case StringType: | 157 case StringType: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 case StringType: | 194 case StringType: |
| 195 return m_string == other.m_string; | 195 return m_string == other.m_string; |
| 196 case ArrayType: | 196 case ArrayType: |
| 197 return m_array == other.m_array; | 197 return m_array == other.m_array; |
| 198 } | 198 } |
| 199 ASSERT_NOT_REACHED(); | 199 ASSERT_NOT_REACHED(); |
| 200 return false; | 200 return false; |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace blink | 203 } // namespace blink |
| OLD | NEW |