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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = base::Value::CreateNullValue().release();
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::FundamentalValue(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))
277 return false; 277 return false;
278 *value = new base::FundamentalValue(val); 278 *value = new base::Value(val);
279 break; 279 break;
280 } 280 }
281 case base::Value::Type::DOUBLE: { 281 case base::Value::Type::DOUBLE: {
282 double val; 282 double val;
283 if (!ReadParam(m, iter, &val)) 283 if (!ReadParam(m, iter, &val))
284 return false; 284 return false;
285 *value = new base::FundamentalValue(val); 285 *value = new base::Value(val);
286 break; 286 break;
287 } 287 }
288 case base::Value::Type::STRING: { 288 case base::Value::Type::STRING: {
289 std::string val; 289 std::string val;
290 if (!ReadParam(m, iter, &val)) 290 if (!ReadParam(m, iter, &val))
291 return false; 291 return false;
292 *value = new base::StringValue(val); 292 *value = new base::StringValue(val);
293 break; 293 break;
294 } 294 }
295 case base::Value::Type::BINARY: { 295 case base::Value::Type::BINARY: {
(...skipping 933 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