chore: use std::make_unique/base::MakeRefCounted when possible (#29510)

This commit is contained in:
David Sanders 2021-06-07 19:00:05 -07:00 committed by GitHub
parent a4decffe9a
commit 79cb5144ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 106 additions and 101 deletions

View file

@ -46,12 +46,11 @@ std::unique_ptr<views::StatusIconLinux> CreateLinuxStatusIcon(
if (AppIndicatorIcon::CouldOpen()) {
++indicators_count;
return std::unique_ptr<views::StatusIconLinux>(new AppIndicatorIcon(
return std::make_unique<AppIndicatorIcon>(
base::StringPrintf("%s%d", id_prefix, indicators_count), image,
tool_tip));
tool_tip);
} else {
return std::unique_ptr<views::StatusIconLinux>(
new GtkStatusIcon(image, tool_tip));
return std::make_unique<GtkStatusIcon>(image, tool_tip);
}
return nullptr;
#endif