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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 if (!ReadParam(m, iter, &val)) | 290 if (!ReadParam(m, iter, &val)) |
291 return false; | 291 return false; |
292 *value = new base::Value(val); | 292 *value = new base::Value(val); |
293 break; | 293 break; |
294 } | 294 } |
295 case base::Value::Type::BINARY: { | 295 case base::Value::Type::BINARY: { |
296 const char* data; | 296 const char* data; |
297 int length; | 297 int length; |
298 if (!iter->ReadData(&data, &length)) | 298 if (!iter->ReadData(&data, &length)) |
299 return false; | 299 return false; |
300 std::unique_ptr<base::BinaryValue> val = | 300 std::unique_ptr<base::Value> val = |
301 base::BinaryValue::CreateWithCopiedBuffer(data, length); | 301 base::Value::CreateWithCopiedBuffer(data, length); |
302 *value = val.release(); | 302 *value = val.release(); |
303 break; | 303 break; |
304 } | 304 } |
305 case base::Value::Type::DICTIONARY: { | 305 case base::Value::Type::DICTIONARY: { |
306 std::unique_ptr<base::DictionaryValue> val(new base::DictionaryValue()); | 306 std::unique_ptr<base::DictionaryValue> val(new base::DictionaryValue()); |
307 if (!ReadDictionaryValue(m, iter, val.get(), recursion)) | 307 if (!ReadDictionaryValue(m, iter, val.get(), recursion)) |
308 return false; | 308 return false; |
309 *value = val.release(); | 309 *value = val.release(); |
310 break; | 310 break; |
311 } | 311 } |
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 return result; | 1229 return result; |
1230 } | 1230 } |
1231 | 1231 |
1232 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { | 1232 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { |
1233 l->append("<MSG>"); | 1233 l->append("<MSG>"); |
1234 } | 1234 } |
1235 | 1235 |
1236 #endif // OS_WIN | 1236 #endif // OS_WIN |
1237 | 1237 |
1238 } // namespace IPC | 1238 } // namespace IPC |
OLD | NEW |