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

Unified Diff: content/browser/indexed_db/leveldb/leveldb_slice.h

Issue 18075008: IndexedDB: Switch key/value handling from vector<char> to std::string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
Index: content/browser/indexed_db/leveldb/leveldb_slice.h
diff --git a/content/browser/indexed_db/leveldb/leveldb_slice.h b/content/browser/indexed_db/leveldb/leveldb_slice.h
deleted file mode 100644
index 97aaba221db538a22d2a6285e01692db6ea22e18..0000000000000000000000000000000000000000
--- a/content/browser/indexed_db/leveldb/leveldb_slice.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2013 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.
-
-#ifndef CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_SLICE_H_
-#define CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_SLICE_H_
-
-#include <string>
-#include <vector>
-
-#include "base/logging.h"
-#include "base/strings/string_piece.h"
-
-namespace content {
-
-class LevelDBSlice {
- public:
- LevelDBSlice(const char* begin, const char* end) : begin_(begin), end_(end) {
- DCHECK_GE(end_, begin_);
- }
-
- explicit LevelDBSlice(const std::vector<char>& v)
- : begin_(v.empty() ? NULL : &*v.begin()), end_(begin_ + v.size()) {
- DCHECK_GE(end_, begin_);
- }
-
- explicit LevelDBSlice(const std::string& v)
- : begin_(v.data()), end_(v.data() + v.size()) {
- DCHECK_GE(end_, begin_);
- }
-
- ~LevelDBSlice() {}
-
- const char* begin() const { return begin_; }
- const char* end() const { return end_; }
-
- base::StringPiece AsStringPiece() const {
- return base::StringPiece(begin_, end_ - begin_);
- }
-
- private:
- const char* begin_;
- const char* end_;
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_SLICE_H_

Powered by Google App Engine
This is Rietveld 408576698