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

Unified Diff: components/leveldb/public/cpp/util.h

Issue 1861903002: mojo leveldb: Add an iteration interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remember to free the remote iterator. Created 4 years, 8 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 | « components/leveldb/public/cpp/remote_iterator.cc ('k') | components/leveldb/public/cpp/util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/leveldb/public/cpp/util.h
diff --git a/components/leveldb/util.h b/components/leveldb/public/cpp/util.h
similarity index 61%
rename from components/leveldb/util.h
rename to components/leveldb/public/cpp/util.h
index cf7a1296bb67567f97941763bdf19b8ea6c6fde3..35837cff7378a33de56176d57f807079792a2643 100644
--- a/components/leveldb/util.h
+++ b/components/leveldb/public/cpp/util.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_LEVELDB_UTIL_H_
-#define COMPONENTS_LEVELDB_UTIL_H_
+#ifndef COMPONENTS_LEVELDB_PUBLIC_CPP_UTIL_H_
+#define COMPONENTS_LEVELDB_PUBLIC_CPP_UTIL_H_
#include "components/leveldb/public/interfaces/leveldb.mojom.h"
@@ -14,11 +14,17 @@ class Status;
DatabaseError LeveldbStatusToError(const leveldb::Status& s);
+leveldb::Status DatabaseErrorToStatus(DatabaseError e,
jam 2016/04/07 16:06:01 nit: please add a comment for all these public met
+ const Slice& msg,
+ const Slice& msg2);
+
// Builds a Slice pointing to the data inside |a|. This is not a type-converter
// as it is not a copy operation; the returned Slice points into |a| and must
// outlive |a|.
leveldb::Slice GetSliceFor(const mojo::Array<uint8_t>& a);
+mojo::Array<uint8_t> GetArrayFor(const leveldb::Slice& s);
+
} // namespace leveldb
-#endif // COMPONENTS_LEVELDB_UTIL_H_
+#endif // COMPONENTS_LEVELDB_PUBLIC_CPP_UTIL_H_
« no previous file with comments | « components/leveldb/public/cpp/remote_iterator.cc ('k') | components/leveldb/public/cpp/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698