Index: components/leveldb_proto/proto_database.h |
diff --git a/components/leveldb_proto/proto_database.h b/components/leveldb_proto/proto_database.h |
index 20c630e1ee9ebe8967bfd418171736f93fd0111f..081233c9ab1f2de4bf93c12a77cfb5fa4be4595a 100644 |
--- a/components/leveldb_proto/proto_database.h |
+++ b/components/leveldb_proto/proto_database.h |
@@ -27,6 +27,9 @@ class ProtoDatabase { |
using UpdateCallback = base::Callback<void(bool success)>; |
using LoadCallback = |
base::Callback<void(bool success, std::unique_ptr<std::vector<T>>)>; |
+ using LoadKeysCallback = |
+ base::Callback<void(bool success, |
+ std::unique_ptr<std::vector<std::string>>)>; |
using GetCallback = base::Callback<void(bool success, std::unique_ptr<T>)>; |
using DestroyCallback = base::Callback<void(bool success)>; |
@@ -53,6 +56,10 @@ class ProtoDatabase { |
// when complete. |
virtual void LoadEntries(const LoadCallback& callback) = 0; |
+ // Asynchronously loads all keys from the database and invokes |callback| with |
+ // those keys when complete. |
+ virtual void LoadKeys(const LoadKeysCallback& callback) = 0; |
+ |
// Asynchronously loads a single entry, identified by |key|, from the database |
// and invokes |callback| when complete. If no entry with |key| is found, |
// a nullptr is passed to the callback, but the success flag is still true. |