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

Unified Diff: chrome/browser/task_profiler/task_profiler_data_serializer.cc

Issue 372103006: Stamp out CreateStringValue in chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
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 9b41ed9eaab60f8de9bc9207ce64d050d82b4425..2613527dbab401964b607c4c3a2e38f607b9f731 100644
--- a/chrome/browser/task_profiler/task_profiler_data_serializer.cc
+++ b/chrome/browser/task_profiler/task_profiler_data_serializer.cc
@@ -28,13 +28,12 @@ namespace {
// Re-serializes the |location| into |dictionary|.
void LocationSnapshotToValue(const LocationSnapshot& location,
base::DictionaryValue* dictionary) {
- dictionary->Set("file_name",
- base::Value::CreateStringValue(location.file_name));
+ dictionary->Set("file_name", new base::StringValue(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",
- base::Value::CreateStringValue(location.function_name));
+ new base::StringValue(location.function_name));
dictionary->Set("line_number",
base::Value::CreateIntegerValue(location.line_number));
}
@@ -50,8 +49,7 @@ void BirthOnThreadSnapshotToValue(const BirthOnThreadSnapshot& birth,
LocationSnapshotToValue(birth.location, location_value.get());
dictionary->Set(prefix + "_location", location_value.release());
- dictionary->Set(prefix + "_thread",
- base::Value::CreateStringValue(birth.thread_name));
+ dictionary->Set(prefix + "_thread", new base::StringValue(birth.thread_name));
}
// Re-serializes the |death_data| into |dictionary|.
@@ -88,8 +86,7 @@ void TaskSnapshotToValue(const TaskSnapshot& snapshot,
dictionary->Set("death_data", death_data.release());
dictionary->Set("death_thread",
- base::Value::CreateStringValue(snapshot.death_thread_name));
-
+ new base::StringValue(snapshot.death_thread_name));
}
} // anonymous namespace

Powered by Google App Engine
This is Rietveld 408576698