chore: use std::make_unique/base::MakeRefCounted when possible (#29510)
This commit is contained in:
parent
a4decffe9a
commit
79cb5144ae
38 changed files with 106 additions and 101 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue