OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "content/common/indexed_db/indexed_db_key_range.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 using WebKit::WebIDBKeyRange; |
| 10 using WebKit::WebIDBKey; |
| 11 |
| 12 IndexedDBKeyRange::IndexedDBKeyRange() |
| 13 : lower_open_(false), |
| 14 upper_open_(false) { |
| 15 lower_.SetNull(); |
| 16 upper_.SetNull(); |
| 17 } |
| 18 |
| 19 IndexedDBKeyRange::IndexedDBKeyRange(const WebIDBKeyRange& key_range) { |
| 20 lower_.Set(key_range.lower()); |
| 21 upper_.Set(key_range.upper()); |
| 22 lower_open_ = key_range.lowerOpen(); |
| 23 upper_open_ = key_range.upperOpen(); |
| 24 } |
| 25 |
| 26 IndexedDBKeyRange::~IndexedDBKeyRange() { |
| 27 } |
| 28 |
| 29 |
| 30 void IndexedDBKeyRange::Set(const IndexedDBKey& lower, |
| 31 const IndexedDBKey& upper, |
| 32 bool lower_open, bool upper_open) { |
| 33 lower_.Set(lower); |
| 34 upper_.Set(upper); |
| 35 lower_open_ = lower_open; |
| 36 upper_open_ = upper_open; |
| 37 } |
| 38 |
| 39 IndexedDBKeyRange::operator WebIDBKeyRange() const { |
| 40 return WebIDBKeyRange(lower_, upper_, lower_open_, upper_open_); |
| 41 } |
OLD | NEW |