Skip to content

Commit

Permalink
CodeHealth: Remove use of ListValue::AppendStrings
Browse files Browse the repository at this point in the history
This change removes the use of `ListValue::AppendStrings()`
and replaces with `Value::Append()`.

This CL was uploaded by git cl split.

[email protected]

Bug: 1187103
Change-Id: Ie903c4ca2b2d09f3d1112be7a0578bbd33e58e42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2891479
Auto-Submit: Anastasiia N <[email protected]>
Commit-Queue: Anastasiia N <[email protected]>
Commit-Queue: John Chen <[email protected]>
Reviewed-by: John Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#882077}
  • Loading branch information
Anastasiia N authored and Chromium LUCI CQ committed May 12, 2021
1 parent 5027943 commit e802ff8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions performance_logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,12 @@ Status PerformanceLogger::StartTrace() {
return Status(kOk);
}
std::unique_ptr<base::ListValue> categories(new base::ListValue());
categories->AppendStrings(base::SplitString(prefs_.trace_categories,
",",
base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY));
const std::vector<std::string> str_list =
base::SplitString(prefs_.trace_categories, ",", base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY);
for (const std::string& str : str_list) {
categories->Append(str);
}
base::DictionaryValue params;
params.Set("traceConfig.includedCategories", std::move(categories));
params.SetString("traceConfig.recordingMode", "recordAsMuchAsPossible");
Expand Down

0 comments on commit e802ff8

Please sign in to comment.