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

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

Issue 2285623002: [Leveldb] Use std::{string,vector} instead of mojo::{String,Array}. (Closed)
Patch Set: Address comments from Yuzhu Created 4 years, 4 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/public/cpp/util.h b/components/leveldb/public/cpp/util.h
index 44f733af30d9806d3ec777beafef2acb7d6611ab..23e1e1d508fb3f362ac62844ab0b988d9483f20a 100644
--- a/components/leveldb/public/cpp/util.h
+++ b/components/leveldb/public/cpp/util.h
@@ -25,10 +25,14 @@ leveldb::Status DatabaseErrorToStatus(mojom::DatabaseError e,
// 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);
+leveldb::Slice GetSliceFor(const std::vector<uint8_t>& a);
-// Copies the data that |s| points to into a mojo::Array.
-mojo::Array<uint8_t> GetArrayFor(const leveldb::Slice& s);
+// Copies the data that |s| points to into a std::vector.
+std::vector<uint8_t> GetVectorFor(const leveldb::Slice& s);
+
+std::string Uint8VectorToStdString(const std::vector<uint8_t>& input);
+
+std::vector<uint8_t> StdStringToUint8Vector(const std::string& input);
} // namespace leveldb
« 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