Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / content / common / indexed_db / indexed_db_key_range.cc
blob171365e4b9341ebcc2c2bb5df890ed453662916e
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 #include "content/common/indexed_db/indexed_db_key_range.h"
7 #include "base/logging.h"
8 #include "third_party/WebKit/public/platform/WebIDBTypes.h"
10 namespace content {
12 IndexedDBKeyRange::IndexedDBKeyRange() = default;
14 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKey& lower,
15 const IndexedDBKey& upper,
16 bool lower_open,
17 bool upper_open)
18 : lower_(lower),
19 upper_(upper),
20 lower_open_(lower_open),
21 upper_open_(upper_open) {}
23 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKey& key)
24 : lower_(key), upper_(key) {
27 IndexedDBKeyRange::IndexedDBKeyRange(const IndexedDBKeyRange& other) = default;
28 IndexedDBKeyRange::~IndexedDBKeyRange() = default;
29 IndexedDBKeyRange& IndexedDBKeyRange::operator=(
30 const IndexedDBKeyRange& other) = default;
32 bool IndexedDBKeyRange::IsOnlyKey() const {
33 if (lower_open_ || upper_open_)
34 return false;
36 return lower_.Equals(upper_);
39 } // namespace content