[content shell] hook up testRunner.dumpEditingCallbacks
[chromium-blink-merge.git] / content / common / indexed_db / indexed_db_key_range.cc
blob1449734d5f617240e8b023c6832be37e122c6f58
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"
9 namespace content {
11 using WebKit::WebIDBKeyRange;
12 using WebKit::WebIDBKey;
14 IndexedDBKeyRange::IndexedDBKeyRange()
15 : lower_open_(false),
16 upper_open_(false) {
17 lower_.SetNull();
18 upper_.SetNull();
21 IndexedDBKeyRange::IndexedDBKeyRange(const WebIDBKeyRange& key_range) {
22 lower_.Set(key_range.lower());
23 upper_.Set(key_range.upper());
24 lower_open_ = key_range.lowerOpen();
25 upper_open_ = key_range.upperOpen();
28 IndexedDBKeyRange::~IndexedDBKeyRange() {
32 void IndexedDBKeyRange::Set(const IndexedDBKey& lower,
33 const IndexedDBKey& upper,
34 bool lower_open, bool upper_open) {
35 lower_.Set(lower);
36 upper_.Set(upper);
37 lower_open_ = lower_open;
38 upper_open_ = upper_open;
41 IndexedDBKeyRange::operator WebIDBKeyRange() const {
42 return WebIDBKeyRange(lower_, upper_, lower_open_, upper_open_);
45 } // namespace content