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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 LOG(ERROR) << "Max recursion depth hit in ReadValue."; | 255 LOG(ERROR) << "Max recursion depth hit in ReadValue."; |
256 return false; | 256 return false; |
257 } | 257 } |
258 | 258 |
259 int type; | 259 int type; |
260 if (!ReadParam(m, iter, &type)) | 260 if (!ReadParam(m, iter, &type)) |
261 return false; | 261 return false; |
262 | 262 |
263 switch (static_cast<base::Value::Type>(type)) { | 263 switch (static_cast<base::Value::Type>(type)) { |
264 case base::Value::Type::NONE: | 264 case base::Value::Type::NONE: |
265 *value = base::Value::CreateNullValue().release(); | 265 *value = new base::Value(); |
266 break; | 266 break; |
267 case base::Value::Type::BOOLEAN: { | 267 case base::Value::Type::BOOLEAN: { |
268 bool val; | 268 bool val; |
269 if (!ReadParam(m, iter, &val)) | 269 if (!ReadParam(m, iter, &val)) |
270 return false; | 270 return false; |
271 *value = new base::Value(val); | 271 *value = new base::Value(val); |
272 break; | 272 break; |
273 } | 273 } |
274 case base::Value::Type::INTEGER: { | 274 case base::Value::Type::INTEGER: { |
275 int val; | 275 int val; |
276 if (!ReadParam(m, iter, &val)) | 276 if (!ReadParam(m, iter, &val)) |
(...skipping 952 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 |