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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 months 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
« no previous file with comments | « ipc/ipc_message_unittest.cc ('k') | ipc/ipc_message_utils_unittest.cc » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « ipc/ipc_message_unittest.cc ('k') | ipc/ipc_message_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698