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

Unified Diff: content/common/indexed_db/indexed_db_key_range.cc

Issue 1074493002: IndexedDB: Added IDBObjectStore.getAll() implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
index d061363fbde4c1baac4147da00eb091b0a9b96fb..b9b79dfd0267410e23a6b5018d336a1f5a727d6d 100644
--- a/content/common/indexed_db/indexed_db_key_range.cc
+++ b/content/common/indexed_db/indexed_db_key_range.cc
@@ -35,8 +35,14 @@ IndexedDBKeyRange& IndexedDBKeyRange::operator=(
bool IndexedDBKeyRange::IsOnlyKey() const {
if (lower_open_ || upper_open_)
return false;
+ if (IsEmpty())
+ return false;
return lower_.Equals(upper_);
}
+bool IndexedDBKeyRange::IsEmpty() const {
+ return !lower_.IsValid() && !upper_.IsValid();
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698