Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / content / browser / indexed_db / leveldb / leveldb_iterator_impl.h
blob147a7bbfb87bdc25dce3b5eebb2c3d3d99825188
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_ITERATOR_IMPL_H_
6 #define CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_ITERATOR_IMPL_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/indexed_db/leveldb/leveldb_iterator.h"
10 #include "content/common/content_export.h"
11 #include "third_party/leveldatabase/src/include/leveldb/iterator.h"
13 namespace content {
15 class CONTENT_EXPORT LevelDBIteratorImpl : public content::LevelDBIterator {
16 public:
17 virtual ~LevelDBIteratorImpl();
18 virtual bool IsValid() const OVERRIDE;
19 virtual leveldb::Status SeekToLast() OVERRIDE;
20 virtual leveldb::Status Seek(const base::StringPiece& target) OVERRIDE;
21 virtual leveldb::Status Next() OVERRIDE;
22 virtual leveldb::Status Prev() OVERRIDE;
23 virtual base::StringPiece Key() const OVERRIDE;
24 virtual base::StringPiece Value() const OVERRIDE;
26 protected:
27 explicit LevelDBIteratorImpl(scoped_ptr<leveldb::Iterator> iterator);
29 private:
30 void CheckStatus();
32 friend class IndexedDBClassFactory;
33 friend class MockBrowserTestIndexedDBClassFactory;
35 scoped_ptr<leveldb::Iterator> iterator_;
37 DISALLOW_COPY_AND_ASSIGN(LevelDBIteratorImpl);
40 } // namespace content
42 #endif // CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_ITERATOR_IMPL_H_