Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: content/common/indexed_db/indexed_db_key_range.cc

Issue 9389025: IndexedDB: Implement IPC plumbing for IDBObjectStore.delete(IDBKeyRange) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698