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

Side by Side Diff: base/trace_event/trace_event_argument.cc

Issue 2664753002: Remove base::StringValue (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 | « base/test/values_test_util.cc ('k') | base/trace_event/trace_event_memory_overhead.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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "base/trace_event/trace_event_argument.h" 5 #include "base/trace_event/trace_event_argument.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 SetIntegerWithCopiedName(name, int_value); 261 SetIntegerWithCopiedName(name, int_value);
262 } break; 262 } break;
263 263
264 case base::Value::Type::DOUBLE: { 264 case base::Value::Type::DOUBLE: {
265 double double_value; 265 double double_value;
266 value.GetAsDouble(&double_value); 266 value.GetAsDouble(&double_value);
267 SetDoubleWithCopiedName(name, double_value); 267 SetDoubleWithCopiedName(name, double_value);
268 } break; 268 } break;
269 269
270 case base::Value::Type::STRING: { 270 case base::Value::Type::STRING: {
271 const StringValue* string_value; 271 const Value* string_value;
272 value.GetAsString(&string_value); 272 value.GetAsString(&string_value);
273 SetStringWithCopiedName(name, string_value->GetString()); 273 SetStringWithCopiedName(name, string_value->GetString());
274 } break; 274 } break;
275 275
276 case base::Value::Type::DICTIONARY: { 276 case base::Value::Type::DICTIONARY: {
277 const DictionaryValue* dict_value; 277 const DictionaryValue* dict_value;
278 value.GetAsDictionary(&dict_value); 278 value.GetAsDictionary(&dict_value);
279 BeginDictionaryWithCopiedName(name); 279 BeginDictionaryWithCopiedName(name);
280 for (DictionaryValue::Iterator it(*dict_value); !it.IsAtEnd(); 280 for (DictionaryValue::Iterator it(*dict_value); !it.IsAtEnd();
281 it.Advance()) { 281 it.Advance()) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 AppendInteger(int_value); 315 AppendInteger(int_value);
316 } break; 316 } break;
317 317
318 case base::Value::Type::DOUBLE: { 318 case base::Value::Type::DOUBLE: {
319 double double_value; 319 double double_value;
320 value.GetAsDouble(&double_value); 320 value.GetAsDouble(&double_value);
321 AppendDouble(double_value); 321 AppendDouble(double_value);
322 } break; 322 } break;
323 323
324 case base::Value::Type::STRING: { 324 case base::Value::Type::STRING: {
325 const StringValue* string_value; 325 const Value* string_value;
326 value.GetAsString(&string_value); 326 value.GetAsString(&string_value);
327 AppendString(string_value->GetString()); 327 AppendString(string_value->GetString());
328 } break; 328 } break;
329 329
330 case base::Value::Type::DICTIONARY: { 330 case base::Value::Type::DICTIONARY: {
331 const DictionaryValue* dict_value; 331 const DictionaryValue* dict_value;
332 value.GetAsDictionary(&dict_value); 332 value.GetAsDictionary(&dict_value);
333 BeginDictionary(); 333 BeginDictionary();
334 for (DictionaryValue::Iterator it(*dict_value); !it.IsAtEnd(); 334 for (DictionaryValue::Iterator it(*dict_value); !it.IsAtEnd();
335 it.Advance()) { 335 it.Advance()) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 TraceEventMemoryOverhead* overhead) { 464 TraceEventMemoryOverhead* overhead) {
465 overhead->Add("TracedValue", 465 overhead->Add("TracedValue",
466 /* allocated size */ 466 /* allocated size */
467 pickle_.GetTotalAllocatedSize(), 467 pickle_.GetTotalAllocatedSize(),
468 /* resident size */ 468 /* resident size */
469 pickle_.size()); 469 pickle_.size());
470 } 470 }
471 471
472 } // namespace trace_event 472 } // namespace trace_event
473 } // namespace base 473 } // namespace base
OLDNEW
« no previous file with comments | « base/test/values_test_util.cc ('k') | base/trace_event/trace_event_memory_overhead.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698