Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / common / indexed_db / indexed_db_key_range.h
blob8bf6fb33d9bc63c476e1f21dde87db9546749034
1 // Copyright (c) 2012 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_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_
6 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_
8 #include "base/basictypes.h"
9 #include "content/common/content_export.h"
10 #include "content/common/indexed_db/indexed_db_key.h"
12 namespace content {
14 class CONTENT_EXPORT IndexedDBKeyRange {
15 public:
16 IndexedDBKeyRange();
17 explicit IndexedDBKeyRange(const IndexedDBKey& key);
18 IndexedDBKeyRange(const IndexedDBKey& lower,
19 const IndexedDBKey& upper,
20 bool lower_open,
21 bool upper_open);
22 IndexedDBKeyRange(const IndexedDBKeyRange& other);
23 ~IndexedDBKeyRange();
24 IndexedDBKeyRange& operator=(const IndexedDBKeyRange& other);
26 const IndexedDBKey& lower() const { return lower_; }
27 const IndexedDBKey& upper() const { return upper_; }
28 bool lower_open() const { return lower_open_; }
29 bool upper_open() const { return upper_open_; }
31 bool IsOnlyKey() const;
32 bool IsEmpty() const;
34 private:
35 IndexedDBKey lower_ = IndexedDBKey(blink::WebIDBKeyTypeNull);
36 IndexedDBKey upper_ = IndexedDBKey(blink::WebIDBKeyTypeNull);
37 bool lower_open_ = false;
38 bool upper_open_ = false;
41 } // namespace content
43 #endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_