| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // Index IDs are allocated sequentially, so we can tell if an index was | 105 // Index IDs are allocated sequentially, so we can tell if an index was |
| 106 // created in this transaction by comparing its ID against the object | 106 // created in this transaction by comparing its ID against the object |
| 107 // store's maximum index ID at the time when the transaction was started. | 107 // store's maximum index ID at the time when the transaction was started. |
| 108 return Id() > old_object_store_metadata.max_index_id; | 108 return Id() > old_object_store_metadata.max_index_id; |
| 109 } | 109 } |
| 110 | 110 |
| 111 void RevertMetadata(RefPtr<IDBIndexMetadata> old_metadata); | 111 void RevertMetadata(RefPtr<IDBIndexMetadata> old_metadata); |
| 112 | 112 |
| 113 // Used internally and by InspectorIndexedDBAgent: | 113 // Used internally and by InspectorIndexedDBAgent: |
| 114 IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection); | 114 IDBRequest* openCursor( |
| 115 ScriptState*, |
| 116 IDBKeyRange*, |
| 117 WebIDBCursorDirection, |
| 118 IDBRequest::AsyncTraceState = IDBRequest::AsyncTraceState()); |
| 115 | 119 |
| 116 WebIDBDatabase* BackendDB() const; | 120 WebIDBDatabase* BackendDB() const; |
| 117 | 121 |
| 118 private: | 122 private: |
| 119 IDBIndex(RefPtr<IDBIndexMetadata>, IDBObjectStore*, IDBTransaction*); | 123 IDBIndex(RefPtr<IDBIndexMetadata>, IDBObjectStore*, IDBTransaction*); |
| 120 | 124 |
| 121 const IDBIndexMetadata& Metadata() const { return *metadata_; } | 125 const IDBIndexMetadata& Metadata() const { return *metadata_; } |
| 122 | 126 |
| 123 IDBRequest* GetInternal(ScriptState*, | 127 IDBRequest* GetInternal(ScriptState*, |
| 124 const ScriptValue& key, | 128 const ScriptValue& key, |
| 125 ExceptionState&, | 129 ExceptionState&, |
| 126 bool key_only); | 130 bool key_only); |
| 127 IDBRequest* GetAllInternal(ScriptState*, | 131 IDBRequest* GetAllInternal(ScriptState*, |
| 128 const ScriptValue& range, | 132 const ScriptValue& range, |
| 129 unsigned long max_count, | 133 unsigned long max_count, |
| 130 ExceptionState&, | 134 ExceptionState&, |
| 131 bool key_only); | 135 bool key_only); |
| 132 | 136 |
| 133 RefPtr<IDBIndexMetadata> metadata_; | 137 RefPtr<IDBIndexMetadata> metadata_; |
| 134 Member<IDBObjectStore> object_store_; | 138 Member<IDBObjectStore> object_store_; |
| 135 Member<IDBTransaction> transaction_; | 139 Member<IDBTransaction> transaction_; |
| 136 bool deleted_ = false; | 140 bool deleted_ = false; |
| 137 }; | 141 }; |
| 138 | 142 |
| 139 } // namespace blink | 143 } // namespace blink |
| 140 | 144 |
| 141 #endif // IDBIndex_h | 145 #endif // IDBIndex_h |
| OLD | NEW |