| Index: content/common/leveldb_wrapper.mojom
|
| diff --git a/content/common/leveldb_wrapper.mojom b/content/common/leveldb_wrapper.mojom
|
| index 27ad0cba2e59c00a46822903ee24b9293679b3d7..91c12f5f25a0a1b95e38d31cadd645826dfa2544 100644
|
| --- a/content/common/leveldb_wrapper.mojom
|
| +++ b/content/common/leveldb_wrapper.mojom
|
| @@ -16,10 +16,12 @@ import "components/leveldb/public/interfaces/leveldb.mojom";
|
| // Note that observer methods are called before the callbacks for the
|
| // LevelDBWrapper methods are run.
|
| interface LevelDBObserver {
|
| + KeyAdded(array<uint8> key, array<uint8> value, string source);
|
| KeyChanged(array<uint8> key, array<uint8> new_value, array<uint8> old_value,
|
| string source);
|
| KeyDeleted(array<uint8> key, array<uint8> old_value, string source);
|
| AllDeleted(string source);
|
| + GetAllComplete(uint64 request_id);
|
| };
|
|
|
| struct KeyValue {
|
| @@ -30,24 +32,21 @@ struct KeyValue {
|
| // A wrapper around leveldb that supports giving notifications when values
|
| // change.
|
| interface LevelDBWrapper {
|
| + AddObserver(LevelDBObserver observer);
|
| +
|
| // Sets the database entry for |key| to |value|. Returns OK on success.
|
| - Put(array<uint8> key, array<uint8> value, string source)
|
| - => (leveldb.DatabaseError status);
|
| + Put(array<uint8> key, array<uint8> value, string source) => (bool success);
|
|
|
| // Remove the database entry (if any) for |key|. Returns OK on success, and a
|
| // non-OK status on error. It is not an error if |key| did not exist in the
|
| // database.
|
| - Delete(array<uint8> key, string source) => (leveldb.DatabaseError status);
|
| + Delete(array<uint8> key, string source) => (bool success);
|
|
|
| // Removes all the entries.
|
| - DeleteAll(LevelDBObserver observer, string source)
|
| - => (leveldb.DatabaseError status);
|
| -
|
| - // Returns the value of the |key|.
|
| - Get(array<uint8> key) => (leveldb.DatabaseError status, array<uint8> value);
|
| + DeleteAll(string source) => (bool success);
|
|
|
| // Only used with small databases. Returns all key/value pairs.
|
| [Sync]
|
| - GetAll(LevelDBObserver observer)
|
| + GetAll(uint64 reqeust_id)
|
| => (leveldb.DatabaseError status, array<KeyValue> data);
|
| };
|
|
|