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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 void ClearIndexCache(); | 163 void ClearIndexCache(); |
164 | 164 |
165 // Sets the object store's metadata to a previous version. | 165 // Sets the object store's metadata to a previous version. |
166 // | 166 // |
167 // The reverting process includes reverting the metadata for the IDBIndex | 167 // The reverting process includes reverting the metadata for the IDBIndex |
168 // instances that are still tracked by the store. It does not revert the | 168 // instances that are still tracked by the store. It does not revert the |
169 // IDBIndex metadata for indexes that were deleted in this transaction. | 169 // IDBIndex metadata for indexes that were deleted in this transaction. |
170 // | 170 // |
171 // Used when a versionchange transaction is aborted. | 171 // Used when a versionchange transaction is aborted. |
172 void RevertMetadata(RefPtr<IDBObjectStoreMetadata> previous_metadata); | 172 void RevertMetadata(RefPtr<IDBObjectStoreMetadata> previous_metadata); |
173 // This relies on the changes made by revertMetadata(). | 173 // This relies on the changes made by RevertMetadata(). |
174 void RevertDeletedIndexMetadata(IDBIndex& deleted_index); | 174 void RevertDeletedIndexMetadata(IDBIndex& deleted_index); |
175 | 175 |
176 // Used by IDBIndex::setName: | 176 // Used by IDBIndex::setName: |
177 bool ContainsIndex(const String& name) const { | 177 bool ContainsIndex(const String& name) const { |
178 return FindIndexId(name) != IDBIndexMetadata::kInvalidId; | 178 return FindIndexId(name) != IDBIndexMetadata::kInvalidId; |
179 } | 179 } |
180 void RenameIndex(int64_t index_id, const String& new_name); | 180 void RenameIndex(int64_t index_id, const String& new_name); |
181 | 181 |
182 WebIDBDatabase* BackendDB() const; | 182 WebIDBDatabase* BackendDB() const; |
183 | 183 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 IDBIndexMap index_map_; | 217 IDBIndexMap index_map_; |
218 | 218 |
219 #if DCHECK_IS_ON() | 219 #if DCHECK_IS_ON() |
220 bool clear_index_cache_called_ = false; | 220 bool clear_index_cache_called_ = false; |
221 #endif // DCHECK_IS_ON() | 221 #endif // DCHECK_IS_ON() |
222 }; | 222 }; |
223 | 223 |
224 } // namespace blink | 224 } // namespace blink |
225 | 225 |
226 #endif // IDBObjectStore_h | 226 #endif // IDBObjectStore_h |
OLD | NEW |