OLD | NEW |
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 Loading... |
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 |
OLD | NEW |