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

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

Issue 9212038: Distinguish null IDBKey (no value) and invalid IDBKey (value is not valid key) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-enable IndexedDBUILayoutTest.LayoutTests Created 8 years, 11 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.h ('k') | content/common/indexed_db/indexed_db_param_traits.cc » ('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.cc
diff --git a/content/common/indexed_db/indexed_db_key.cc b/content/common/indexed_db/indexed_db_key.cc
index 1b9491d7b87c98f60ef3b8f39f966638a1efce9f..f2a7cfbb7930b12f47237a7f50d692f925077da6 100644
--- a/content/common/indexed_db/indexed_db_key.cc
+++ b/content/common/indexed_db/indexed_db_key.cc
@@ -11,7 +11,7 @@
using WebKit::WebIDBKey;
IndexedDBKey::IndexedDBKey()
- : type_(WebIDBKey::InvalidType),
+ : type_(WebIDBKey::NullType),
date_(0),
number_(0) {
}
@@ -27,6 +27,10 @@ void IndexedDBKey::SetInvalid() {
type_ = WebIDBKey::InvalidType;
}
+void IndexedDBKey::SetNull() {
+ type_ = WebIDBKey::NullType;
+}
+
void IndexedDBKey::SetArray(const std::vector<IndexedDBKey>& array) {
type_ = WebIDBKey::ArrayType;
array_ = array;
@@ -72,10 +76,9 @@ IndexedDBKey::operator WebIDBKey() const {
case WebIDBKey::NumberType:
return WebIDBKey::createNumber(number_);
case WebIDBKey::InvalidType:
- default:
- // TODO(jsbell): Remove "default" label once WebKit bug 76487 has rolled.
- // http://crbug.com/110956
return WebIDBKey::createInvalid();
+ case WebIDBKey::NullType:
+ return WebIDBKey::createNull();
}
NOTREACHED();
return WebIDBKey::createInvalid();
« no previous file with comments | « content/common/indexed_db/indexed_db_key.h ('k') | content/common/indexed_db/indexed_db_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698