diff options
author | jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-01 03:39:49 +0000 |
---|---|---|
committer | jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-01 03:39:49 +0000 |
commit | 3529565d2bf04c8437825bc5db73c00b41840674 (patch) | |
tree | ecef519df7b040a0672351d7753bbebcbde3c3bb | |
parent | c54d84dfa6279119dc6a15a80953d8e866c97e58 (diff) | |
download | chromium_src-3529565d2bf04c8437825bc5db73c00b41840674.zip chromium_src-3529565d2bf04c8437825bc5db73c00b41840674.tar.gz chromium_src-3529565d2bf04c8437825bc5db73c00b41840674.tar.bz2 |
IndexedDB: Add defaults for switches on WebIDBKeyType (1/4)
Experimental support for "binary" keys is being added to Indexed DB,
which requires extending a type enum. Add 'default:' cases to various
switches on the Chromium side so that the Blink API can be extended.
(This is part 1 of a 4 part landing sequence.)
BUG=297304
R=alecflett@chromium.org
Review URL: https://codereview.chromium.org/25320002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226129 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed, 7 insertions, 1 deletions
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.cc b/content/browser/indexed_db/indexed_db_leveldb_coding.cc index 3a70280..38799fc 100644 --- a/content/browser/indexed_db/indexed_db_leveldb_coding.cc +++ b/content/browser/indexed_db/indexed_db_leveldb_coding.cc @@ -286,7 +286,8 @@ void EncodeIDBKey(const IndexedDBKey& value, std::string* into) { switch (value.type()) { case WebIDBKeyTypeNull: case WebIDBKeyTypeInvalid: - case WebIDBKeyTypeMin: { + case WebIDBKeyTypeMin: + default: { NOTREACHED(); EncodeByte(kIndexedDBKeyNullTypeByte, into); return; diff --git a/content/child/indexed_db/indexed_db_key_builders.cc b/content/child/indexed_db/indexed_db_key_builders.cc index 380c0cb..d2c2773 100644 --- a/content/child/indexed_db/indexed_db_key_builders.cc +++ b/content/child/indexed_db/indexed_db_key_builders.cc @@ -54,6 +54,7 @@ IndexedDBKey IndexedDBKeyBuilder::Build(const WebKit::WebIDBKey& key) { case WebIDBKeyTypeInvalid: return IndexedDBKey(key.keyType()); case WebIDBKeyTypeMin: + default: NOTREACHED(); return IndexedDBKey(); } @@ -82,6 +83,7 @@ WebIDBKey WebIDBKeyBuilder::Build(const IndexedDBKey& key) { case WebIDBKeyTypeNull: return WebIDBKey::createNull(); case WebIDBKeyTypeMin: + default: NOTREACHED(); return WebIDBKey::createInvalid(); } diff --git a/content/common/indexed_db/indexed_db_key.cc b/content/common/indexed_db/indexed_db_key.cc index e84d378..529dffa 100644 --- a/content/common/indexed_db/indexed_db_key.cc +++ b/content/common/indexed_db/indexed_db_key.cc @@ -103,6 +103,7 @@ int IndexedDBKey::Compare(const IndexedDBKey& other) const { case WebIDBKeyTypeInvalid: case WebIDBKeyTypeNull: case WebIDBKeyTypeMin: + default: NOTREACHED(); return 0; } diff --git a/content/common/indexed_db/indexed_db_param_traits.cc b/content/common/indexed_db/indexed_db_param_traits.cc index 2098aed9..595cc81 100644 --- a/content/common/indexed_db/indexed_db_param_traits.cc +++ b/content/common/indexed_db/indexed_db_param_traits.cc @@ -48,6 +48,7 @@ void ParamTraits<IndexedDBKey>::Write(Message* m, const param_type& p) { case WebIDBKeyTypeNull: return; case WebIDBKeyTypeMin: + default: NOTREACHED(); return; } @@ -89,6 +90,7 @@ bool ParamTraits<IndexedDBKey>::Read(const Message* m, *r = IndexedDBKey(web_type); return true; case WebIDBKeyTypeMin: + default: NOTREACHED(); return false; } |