Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / content / browser / indexed_db / leveldb / leveldb_iterator_impl.h
blob72b92e0f93b15889ad40e71d18e9a30a0bdd50e5
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 ~LevelDBIteratorImpl() override;
18 bool IsValid() const override;
19 leveldb::Status SeekToLast() override;
20 leveldb::Status Seek(const base::StringPiece& target) override;
21 leveldb::Status Next() override;
22 leveldb::Status Prev() override;
23 base::StringPiece Key() const override;
24 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_