| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module content; | 5 module content; |
| 6 | 6 |
| 7 import "components/leveldb/public/interfaces/leveldb.mojom"; | 7 import "components/leveldb/public/interfaces/leveldb.mojom"; |
| 8 | 8 |
| 9 struct KeyValue { | 9 struct KeyValue { |
| 10 array<uint8> key; | 10 array<uint8> key; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // did not exist in the database. | 23 // did not exist in the database. |
| 24 Delete(array<uint8> key, string source) => (leveldb.DatabaseError status); | 24 Delete(array<uint8> key, string source) => (leveldb.DatabaseError status); |
| 25 | 25 |
| 26 // Removes all the entries. | 26 // Removes all the entries. |
| 27 DeleteAll(string source) => (leveldb.DatabaseError status); | 27 DeleteAll(string source) => (leveldb.DatabaseError status); |
| 28 | 28 |
| 29 // Returns the value of the given key. | 29 // Returns the value of the given key. |
| 30 Get(array<uint8> key) => (leveldb.DatabaseError status, array<uint8> value); | 30 Get(array<uint8> key) => (leveldb.DatabaseError status, array<uint8> value); |
| 31 | 31 |
| 32 // Only used with small databases. Returns all key/value pairs. | 32 // Only used with small databases. Returns all key/value pairs. |
| 33 [Sync] |
| 33 GetAll() => (leveldb.DatabaseError status, array<KeyValue> data); | 34 GetAll() => (leveldb.DatabaseError status, array<KeyValue> data); |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 // Gives information about changes to a LevelDB database. | 37 // Gives information about changes to a LevelDB database. |
| 37 interface LevelDBObserver { | 38 interface LevelDBObserver { |
| 38 KeyChanged(array<uint8> key, array<uint8> new_value, array<uint8> old_value, | 39 KeyChanged(array<uint8> key, array<uint8> new_value, array<uint8> old_value, |
| 39 string source); | 40 string source); |
| 40 KeyDeleted(array<uint8> key, string source); | 41 KeyDeleted(array<uint8> key, string source); |
| 41 AllDeleted(string source); | 42 AllDeleted(string source); |
| 42 }; | 43 }; |
| OLD | NEW |