Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Unified Diff: content/common/leveldb_wrapper.mojom

Issue 1814003002: Implement the renderer side of the mojo based local storage implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/leveldb_wrapper_impl.cc ('k') | content/renderer/dom_storage/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/leveldb_wrapper.mojom
diff --git a/content/common/leveldb_wrapper.mojom b/content/common/leveldb_wrapper.mojom
index 32edb09f2eb311ac19b65023114d916f96816e8b..27ad0cba2e59c00a46822903ee24b9293679b3d7 100644
--- a/content/common/leveldb_wrapper.mojom
+++ b/content/common/leveldb_wrapper.mojom
@@ -11,10 +11,14 @@ import "components/leveldb/public/interfaces/leveldb.mojom";
// being specified when opening a LevelDBWrapper, is to avoid the client getting
// callbacks for changes that have already been applied to its database that
// it's fetching via GetAll or it's clearing via DeleteAll.
+// In the methods below, |source| is a user-defined string which was passed to
+// the various LevelDBWrapper methods.
+// Note that observer methods are called before the callbacks for the
+// LevelDBWrapper methods are run.
interface LevelDBObserver {
KeyChanged(array<uint8> key, array<uint8> new_value, array<uint8> old_value,
string source);
- KeyDeleted(array<uint8> key, string source);
+ KeyDeleted(array<uint8> key, array<uint8> old_value, string source);
AllDeleted(string source);
};
@@ -26,20 +30,20 @@ struct KeyValue {
// A wrapper around leveldb that supports giving notifications when values
// change.
interface LevelDBWrapper {
- // Sets the database entry for "key" to "value". Returns OK on success.
+ // Sets the database entry for |key| to |value|. Returns OK on success.
Put(array<uint8> key, array<uint8> value, string source)
=> (leveldb.DatabaseError status);
- // 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.
+ // 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);
// Removes all the entries.
DeleteAll(LevelDBObserver observer, string source)
=> (leveldb.DatabaseError status);
- // Returns the value of the given key.
+ // Returns the value of the |key|.
Get(array<uint8> key) => (leveldb.DatabaseError status, array<uint8> value);
// Only used with small databases. Returns all key/value pairs.
« no previous file with comments | « content/browser/leveldb_wrapper_impl.cc ('k') | content/renderer/dom_storage/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698