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

Unified Diff: components/leveldb/util.cc

Issue 1861903002: mojo leveldb: Add an iteration interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + comments 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/util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/leveldb/util.cc
diff --git a/components/leveldb/util.cc b/components/leveldb/util.cc
deleted file mode 100644
index cffee8d08ddf3d299552a9711ac48a6b082e06cf..0000000000000000000000000000000000000000
--- a/components/leveldb/util.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/leveldb/util.h"
-
-#include "third_party/leveldatabase/src/include/leveldb/status.h"
-
-namespace leveldb {
-
-DatabaseError LeveldbStatusToError(const leveldb::Status& s) {
- if (s.ok())
- return DatabaseError::OK;
- if (s.IsNotFound())
- return DatabaseError::NOT_FOUND;
- if (s.IsCorruption())
- return DatabaseError::CORRUPTION;
- if (s.IsNotSupportedError())
- return DatabaseError::NOT_SUPPORTED;
- if (s.IsIOError())
- return DatabaseError::IO_ERROR;
- return DatabaseError::INVALID_ARGUMENT;
-}
-
-leveldb::Slice GetSliceFor(const mojo::Array<uint8_t>& key) {
- if (key.size() == 0)
- return leveldb::Slice();
- return leveldb::Slice(reinterpret_cast<const char*>(&key.front()),
- key.size());
-}
-
-} // namespace leveldb
« no previous file with comments | « components/leveldb/util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698