| Index: chrome/browser/task_profiler/task_profiler_data_serializer.cc
|
| diff --git a/chrome/browser/task_profiler/task_profiler_data_serializer.cc b/chrome/browser/task_profiler/task_profiler_data_serializer.cc
|
| index 2613527dbab401964b607c4c3a2e38f607b9f731..e2b9f184c4e094fc48902a60823d4181ba9a1909 100644
|
| --- a/chrome/browser/task_profiler/task_profiler_data_serializer.cc
|
| +++ b/chrome/browser/task_profiler/task_profiler_data_serializer.cc
|
| @@ -28,14 +28,12 @@ namespace {
|
| // Re-serializes the |location| into |dictionary|.
|
| void LocationSnapshotToValue(const LocationSnapshot& location,
|
| base::DictionaryValue* dictionary) {
|
| - dictionary->Set("file_name", new base::StringValue(location.file_name));
|
| + dictionary->SetString("file_name", location.file_name);
|
| // Note: This function name is not escaped, and templates have less-than
|
| // characters, which means this is not suitable for display as HTML unless
|
| // properly escaped.
|
| - dictionary->Set("function_name",
|
| - new base::StringValue(location.function_name));
|
| - dictionary->Set("line_number",
|
| - base::Value::CreateIntegerValue(location.line_number));
|
| + dictionary->SetString("function_name", location.function_name);
|
| + dictionary->SetInteger("line_number", location.line_number);
|
| }
|
|
|
| // Re-serializes the |birth| into |dictionary|. Prepends the |prefix| to the
|
| @@ -55,25 +53,13 @@ void BirthOnThreadSnapshotToValue(const BirthOnThreadSnapshot& birth,
|
| // Re-serializes the |death_data| into |dictionary|.
|
| void DeathDataSnapshotToValue(const DeathDataSnapshot& death_data,
|
| base::DictionaryValue* dictionary) {
|
| - dictionary->Set("count",
|
| - base::Value::CreateIntegerValue(death_data.count));
|
| - dictionary->Set("run_ms",
|
| - base::Value::CreateIntegerValue(death_data.run_duration_sum));
|
| - dictionary->Set("run_ms_max",
|
| - base::Value::CreateIntegerValue(death_data.run_duration_max));
|
| - dictionary->Set("run_ms_sample",
|
| - base::Value::CreateIntegerValue(
|
| - death_data.run_duration_sample));
|
| - dictionary->Set("queue_ms",
|
| - base::Value::CreateIntegerValue(
|
| - death_data.queue_duration_sum));
|
| - dictionary->Set("queue_ms_max",
|
| - base::Value::CreateIntegerValue(
|
| - death_data.queue_duration_max));
|
| - dictionary->Set("queue_ms_sample",
|
| - base::Value::CreateIntegerValue(
|
| - death_data.queue_duration_sample));
|
| -
|
| + dictionary->SetInteger("count", death_data.count);
|
| + dictionary->SetInteger("run_ms", death_data.run_duration_sum);
|
| + dictionary->SetInteger("run_ms_max", death_data.run_duration_max);
|
| + dictionary->SetInteger("run_ms_sample", death_data.run_duration_sample);
|
| + dictionary->SetInteger("queue_ms", death_data.queue_duration_sum);
|
| + dictionary->SetInteger("queue_ms_max", death_data.queue_duration_max);
|
| + dictionary->SetInteger("queue_ms_sample", death_data.queue_duration_sample);
|
| }
|
|
|
| // Re-serializes the |snapshot| into |dictionary|.
|
| @@ -85,8 +71,7 @@ void TaskSnapshotToValue(const TaskSnapshot& snapshot,
|
| DeathDataSnapshotToValue(snapshot.death_data, death_data.get());
|
| dictionary->Set("death_data", death_data.release());
|
|
|
| - dictionary->Set("death_thread",
|
| - new base::StringValue(snapshot.death_thread_name));
|
| + dictionary->SetString("death_thread", snapshot.death_thread_name);
|
| }
|
|
|
| } // anonymous namespace
|
|
|