| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ipc/ipc_message_utils.h" | 5 #include "ipc/ipc_message_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 break; | 195 break; |
| 196 } | 196 } |
| 197 case base::Value::Type::LIST: { | 197 case base::Value::Type::LIST: { |
| 198 const base::ListValue* list = static_cast<const base::ListValue*>(value); | 198 const base::ListValue* list = static_cast<const base::ListValue*>(value); |
| 199 WriteParam(m, static_cast<int>(list->GetSize())); | 199 WriteParam(m, static_cast<int>(list->GetSize())); |
| 200 for (const auto& entry : *list) { | 200 for (const auto& entry : *list) { |
| 201 WriteValue(m, entry.get(), recursion + 1); | 201 WriteValue(m, entry.get(), recursion + 1); |
| 202 } | 202 } |
| 203 break; | 203 break; |
| 204 } | 204 } |
| 205 case base::Value::Type::DELETED: { |
| 206 // TODO(crbug.com/697817): This means a use-after-free. |
| 207 CHECK(false); |
| 208 return; |
| 209 } |
| 205 } | 210 } |
| 206 } | 211 } |
| 207 | 212 |
| 208 // Helper for ReadValue that reads a DictionaryValue into a pre-allocated | 213 // Helper for ReadValue that reads a DictionaryValue into a pre-allocated |
| 209 // object. | 214 // object. |
| 210 bool ReadDictionaryValue(const base::Pickle* m, | 215 bool ReadDictionaryValue(const base::Pickle* m, |
| 211 base::PickleIterator* iter, | 216 base::PickleIterator* iter, |
| 212 base::DictionaryValue* value, | 217 base::DictionaryValue* value, |
| 213 int recursion) { | 218 int recursion) { |
| 214 int size; | 219 int size; |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 return result; | 1234 return result; |
| 1230 } | 1235 } |
| 1231 | 1236 |
| 1232 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { | 1237 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { |
| 1233 l->append("<MSG>"); | 1238 l->append("<MSG>"); |
| 1234 } | 1239 } |
| 1235 | 1240 |
| 1236 #endif // OS_WIN | 1241 #endif // OS_WIN |
| 1237 | 1242 |
| 1238 } // namespace IPC | 1243 } // namespace IPC |
| OLD | NEW |