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

Unified Diff: base/trace_event/trace_event_unittest.cc

Issue 1927753002: Convert callers of base::DeepCopy() to base::CreateDeepCopy() in //base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« base/json/json_reader.cc ('K') | « base/json/json_reader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_event_unittest.cc
diff --git a/base/trace_event/trace_event_unittest.cc b/base/trace_event/trace_event_unittest.cc
index 6a1d8a4991d28952f25e900e7378c48cd6ef80f9..e626a779ed5e33cc5b1eb8dedac1435c0984b282 100644
--- a/base/trace_event/trace_event_unittest.cc
+++ b/base/trace_event/trace_event_unittest.cc
@@ -267,15 +267,15 @@ DictionaryValue* TraceEventTestFixture::FindMatchingTraceEntry(
}
void TraceEventTestFixture::DropTracedMetadataRecords() {
- std::unique_ptr<ListValue> old_trace_parsed(trace_parsed_.DeepCopy());
+ std::unique_ptr<ListValue> old_trace_parsed(trace_parsed_.CreateDeepCopy());
size_t old_trace_parsed_size = old_trace_parsed->GetSize();
trace_parsed_.Clear();
for (size_t i = 0; i < old_trace_parsed_size; i++) {
- Value* value = NULL;
+ Value* value = nullptr;
old_trace_parsed->Get(i, &value);
if (!value || value->GetType() != Value::TYPE_DICTIONARY) {
- trace_parsed_.Append(value->DeepCopy());
+ trace_parsed_.Append(value->CreateDeepCopy());
continue;
}
DictionaryValue* dict = static_cast<DictionaryValue*>(value);
@@ -283,7 +283,7 @@ void TraceEventTestFixture::DropTracedMetadataRecords() {
if (dict->GetString("ph", &tmp) && tmp == "M")
continue;
- trace_parsed_.Append(value->DeepCopy());
+ trace_parsed_.Append(value->CreateDeepCopy());
}
}
« base/json/json_reader.cc ('K') | « base/json/json_reader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698