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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/common/indexed_db/indexed_db_key_range.cc
diff --git a/content/common/indexed_db/indexed_db_key_range.cc b/content/common/indexed_db/indexed_db_key_range.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2026ca6014fe8b734a1608a1bb51701a763c987e
--- /dev/null
+++ b/content/common/indexed_db/indexed_db_key_range.cc
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/indexed_db/indexed_db_key_range.h"
+
+#include "base/logging.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
+
+using WebKit::WebIDBKeyRange;
+using WebKit::WebIDBKey;
+
+IndexedDBKeyRange::IndexedDBKeyRange()
+ : lower_open_(false),
+ upper_open_(false) {
+ lower_.SetNull();
+ upper_.SetNull();
+}
+
+IndexedDBKeyRange::IndexedDBKeyRange(const WebIDBKeyRange& key_range) {
+ lower_.Set(key_range.lower());
+ upper_.Set(key_range.upper());
+ lower_open_ = key_range.lowerOpen();
+ upper_open_ = key_range.upperOpen();
+}
+
+IndexedDBKeyRange::~IndexedDBKeyRange() {
+}
+
+
+void IndexedDBKeyRange::Set(const IndexedDBKey& lower,
+ const IndexedDBKey& upper,
+ bool lower_open, bool upper_open) {
+ lower_.Set(lower);
+ upper_.Set(upper);
+ lower_open_ = lower_open;
+ upper_open_ = upper_open;
+}
+
+IndexedDBKeyRange::operator WebIDBKeyRange() const {
+ return WebIDBKeyRange(lower_, upper_, lower_open_, upper_open_);
+}

Powered by Google App Engine
This is Rietveld 408576698