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 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" |
| 10 |
| 11 using WebKit::WebIDBKeyRange; |
| 12 using WebKit::WebIDBKey; |
| 13 |
| 14 IndexedDBKeyRange::IndexedDBKeyRange() |
| 15 : lower_open_(false), |
| 16 upper_open_(false) { |
| 17 lower_.SetNull(); |
| 18 upper_.SetNull(); |
| 19 } |
| 20 |
| 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(); |
| 26 } |
| 27 |
| 28 IndexedDBKeyRange::~IndexedDBKeyRange() { |
| 29 } |
| 30 |
| 31 |
| 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; |
| 39 } |
| 40 |
| 41 IndexedDBKeyRange::operator WebIDBKeyRange() const { |
| 42 return WebIDBKeyRange(lower_, upper_, lower_open_, upper_open_); |
| 43 } |
OLD | NEW |