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

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: Rename to avoid overloading, remove bad includes 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
« no previous file with comments | « content/common/indexed_db/indexed_db_key_range.h ('k') | content/common/indexed_db/indexed_db_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0567e8d809c00d41b07721446faf5203497aeec2
--- /dev/null
+++ b/content/common/indexed_db/indexed_db_key_range.cc
@@ -0,0 +1,41 @@
+// 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"
+
+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_);
+}
« no previous file with comments | « content/common/indexed_db/indexed_db_key_range.h ('k') | content/common/indexed_db/indexed_db_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698