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

Side by Side Diff: chrome/common/indexed_db_param_traits.cc

Issue 5983001: Re-land 69416 - IndexedDB: Preparatory patch for using Date objects as keys.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/indexed_db_key.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/indexed_db_param_traits.h" 5 #include "chrome/common/indexed_db_param_traits.h"
6 6
7 #include "chrome/common/indexed_db_key.h" 7 #include "chrome/common/indexed_db_key.h"
8 #include "chrome/common/serialized_script_value.h" 8 #include "chrome/common/serialized_script_value.h"
9 #include "ipc/ipc_message_utils.h" 9 #include "ipc/ipc_message_utils.h"
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return true; 71 return true;
72 case WebKit::WebIDBKey::StringType: 72 case WebKit::WebIDBKey::StringType:
73 r->Set(string); 73 r->Set(string);
74 return true; 74 return true;
75 case WebKit::WebIDBKey::NumberType: 75 case WebKit::WebIDBKey::NumberType:
76 r->Set(number); 76 r->Set(number);
77 return true; 77 return true;
78 case WebKit::WebIDBKey::InvalidType: 78 case WebKit::WebIDBKey::InvalidType:
79 r->SetInvalid(); 79 r->SetInvalid();
80 return true; 80 return true;
81 default:
82 // TODO(hans): Implement the WebIDBKey::DateType case once that is added
83 // WebKit side, and then remove this temporary default: clause.
84 r->SetInvalid();
85 return true;
81 } 86 }
82 NOTREACHED(); 87 NOTREACHED();
83 return false; 88 return false;
84 } 89 }
85 90
86 void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::string* l) { 91 void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::string* l) {
87 l->append("<IndexedDBKey>("); 92 l->append("<IndexedDBKey>(");
88 LogParam(int(p.type()), l); 93 LogParam(int(p.type()), l);
89 l->append(", "); 94 l->append(", ");
90 LogParam(p.string(), l); 95 LogParam(p.string(), l);
91 l->append(", "); 96 l->append(", ");
92 LogParam(p.number(), l); 97 LogParam(p.number(), l);
93 l->append(")"); 98 l->append(")");
94 } 99 }
95 100
96 } // namespace IPC 101 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/indexed_db_key.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698