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

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

Issue 15659013: Revert "Migrate the IndexedDB backend from Blink to Chromium" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/indexed_db/indexed_db_param_traits.cc
diff --git a/content/common/indexed_db/indexed_db_param_traits.cc b/content/common/indexed_db/indexed_db_param_traits.cc
index 58019ce724c8bfcc6dfb0fb98bad4c26cc4be179..8593f752fedca025574b893ad40bb2dd782a3d8f 100644
--- a/content/common/indexed_db/indexed_db_param_traits.cc
+++ b/content/common/indexed_db/indexed_db_param_traits.cc
@@ -4,8 +4,6 @@
#include "content/common/indexed_db/indexed_db_param_traits.h"
-#include <string>
-#include <vector>
#include "content/common/indexed_db/indexed_db_key.h"
#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/indexed_db/indexed_db_key_range.h"
@@ -21,7 +19,7 @@ using WebKit::WebIDBKeyPath;
namespace IPC {
void ParamTraits<IndexedDBKey>::Write(Message* m, const param_type& p) {
- WriteParam(m, static_cast<int>(p.type()));
+ WriteParam(m, int(p.type()));
switch (p.type()) {
case WebIDBKey::ArrayType:
WriteParam(m, p.array());
@@ -38,7 +36,8 @@ void ParamTraits<IndexedDBKey>::Write(Message* m, const param_type& p) {
case WebIDBKey::InvalidType:
case WebIDBKey::NullType:
return;
- case WebIDBKey::MinType:
+ default:
+ // This is a placeholder for WebKit::WebIDBKey::MinType
NOTREACHED();
return;
}
@@ -79,17 +78,16 @@ bool ParamTraits<IndexedDBKey>::Read(const Message* m,
case WebIDBKey::NullType:
*r = IndexedDBKey(web_type);
return true;
- case WebIDBKey::MinType:
+ default:
+ // This is a placeholder for WebKit::WebIDBKey::MinType
NOTREACHED();
return false;
}
- NOTREACHED();
- return false;
}
void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::string* l) {
l->append("<IndexedDBKey>(");
- LogParam(static_cast<int>(p.type()), l);
+ LogParam(int(p.type()), l);
l->append(", ");
l->append("[");
std::vector<IndexedDBKey>::const_iterator it = p.array().begin();
@@ -109,7 +107,7 @@ void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::string* l) {
}
void ParamTraits<IndexedDBKeyPath>::Write(Message* m, const param_type& p) {
- WriteParam(m, static_cast<int>(p.type()));
+ WriteParam(m, int(p.type()));
switch (p.type()) {
case WebIDBKeyPath::ArrayType:
WriteParam(m, p.array());
@@ -155,7 +153,7 @@ bool ParamTraits<IndexedDBKeyPath>::Read(const Message* m,
void ParamTraits<IndexedDBKeyPath>::Log(const param_type& p, std::string* l) {
l->append("<IndexedDBKeyPath>(");
- LogParam(static_cast<int>(p.type()), l);
+ LogParam(int(p.type()), l);
l->append(", ");
LogParam(p.string(), l);
l->append(", ");
« no previous file with comments | « content/common/indexed_db/indexed_db_key.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698