| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 keys.append(IDBKey::createDate(array[i].date())); | 109 keys.append(IDBKey::createDate(array[i].date())); |
| 110 break; | 110 break; |
| 111 case WebIDBKeyTypeNumber: | 111 case WebIDBKeyTypeNumber: |
| 112 keys.append(IDBKey::createNumber(array[i].number())); | 112 keys.append(IDBKey::createNumber(array[i].number())); |
| 113 break; | 113 break; |
| 114 case WebIDBKeyTypeInvalid: | 114 case WebIDBKeyTypeInvalid: |
| 115 keys.append(IDBKey::createInvalid()); | 115 keys.append(IDBKey::createInvalid()); |
| 116 break; | 116 break; |
| 117 case WebIDBKeyTypeNull: | 117 case WebIDBKeyTypeNull: |
| 118 case WebIDBKeyTypeMin: | 118 case WebIDBKeyTypeMin: |
| 119 ASSERT_NOT_REACHED(); | 119 NOTREACHED(); |
| 120 break; | 120 break; |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 return IDBKey::createArray(keys); | 123 return IDBKey::createArray(keys); |
| 124 } | 124 } |
| 125 | 125 |
| 126 static void convertToWebIDBKeyArray(const IDBKey::KeyArray& array, WebVector<Web
IDBKey>& result) | 126 static void convertToWebIDBKeyArray(const IDBKey::KeyArray& array, WebVector<Web
IDBKey>& result) |
| 127 { | 127 { |
| 128 WebVector<WebIDBKey> keys(array.size()); | 128 WebVector<WebIDBKey> keys(array.size()); |
| 129 WebVector<WebIDBKey> subkeys; | 129 WebVector<WebIDBKey> subkeys; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 143 case IDBKey::DateType: | 143 case IDBKey::DateType: |
| 144 keys[i] = WebIDBKey::createDate(key->date()); | 144 keys[i] = WebIDBKey::createDate(key->date()); |
| 145 break; | 145 break; |
| 146 case IDBKey::NumberType: | 146 case IDBKey::NumberType: |
| 147 keys[i] = WebIDBKey::createNumber(key->number()); | 147 keys[i] = WebIDBKey::createNumber(key->number()); |
| 148 break; | 148 break; |
| 149 case IDBKey::InvalidType: | 149 case IDBKey::InvalidType: |
| 150 keys[i] = WebIDBKey::createInvalid(); | 150 keys[i] = WebIDBKey::createInvalid(); |
| 151 break; | 151 break; |
| 152 case IDBKey::MinType: | 152 case IDBKey::MinType: |
| 153 ASSERT_NOT_REACHED(); | 153 NOTREACHED(); |
| 154 break; | 154 break; |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 result.swap(keys); | 157 result.swap(keys); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void WebIDBKey::assignArray(const WebVector<WebIDBKey>& array) | 160 void WebIDBKey::assignArray(const WebVector<WebIDBKey>& array) |
| 161 { | 161 { |
| 162 m_private = convertFromWebIDBKeyArray(array); | 162 m_private = convertFromWebIDBKeyArray(array); |
| 163 } | 163 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 { | 227 { |
| 228 return m_private->date(); | 228 return m_private->date(); |
| 229 } | 229 } |
| 230 | 230 |
| 231 double WebIDBKey::number() const | 231 double WebIDBKey::number() const |
| 232 { | 232 { |
| 233 return m_private->number(); | 233 return m_private->number(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace blink | 236 } // namespace blink |
| OLD | NEW |