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

Unified Diff: chrome/browser/ui/views/download/download_item_view_md.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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/ui/views/download/download_item_view_md.cc
diff --git a/chrome/browser/ui/views/download/download_item_view_md.cc b/chrome/browser/ui/views/download/download_item_view_md.cc
index 732c7f8037b6f39d7eebaa9ef1cd972f990df718..87200361f164b791178b55d132a64166b00e6085 100644
--- a/chrome/browser/ui/views/download/download_item_view_md.cc
+++ b/chrome/browser/ui/views/download/download_item_view_md.cc
@@ -493,10 +493,10 @@ void DownloadItemViewMd::AddInkDropLayer(ui::Layer* ink_drop_layer) {
std::unique_ptr<views::InkDropRipple> DownloadItemViewMd::CreateInkDropRipple()
const {
- return base::WrapUnique(new views::FloodFillInkDropRipple(
+ return base::MakeUnique<views::FloodFillInkDropRipple>(
GetLocalBounds(), GetInkDropCenterBasedOnLastEvent(),
color_utils::DeriveDefaultIconColor(GetTextColor()),
- ink_drop_visible_opacity()));
+ ink_drop_visible_opacity());
}
std::unique_ptr<views::InkDropHighlight>
@@ -505,10 +505,10 @@ DownloadItemViewMd::CreateInkDropHighlight() const {
return nullptr;
gfx::Size size = GetPreferredSize();
- return base::WrapUnique(new views::InkDropHighlight(
+ return base::MakeUnique<views::InkDropHighlight>(
size, kInkDropSmallCornerRadius,
gfx::RectF(gfx::SizeF(size)).CenterPoint(),
- color_utils::DeriveDefaultIconColor(GetTextColor())));
+ color_utils::DeriveDefaultIconColor(GetTextColor()));
}
void DownloadItemViewMd::OnGestureEvent(ui::GestureEvent* event) {
@@ -802,8 +802,8 @@ void DownloadItemViewMd::UpdateColorsFromTheme() {
if (!GetThemeProvider())
return;
- SetBorder(base::WrapUnique(new SeparatorBorder(GetThemeProvider()->GetColor(
- ThemeProperties::COLOR_TOOLBAR_VERTICAL_SEPARATOR))));
+ SetBorder(base::MakeUnique<SeparatorBorder>(GetThemeProvider()->GetColor(
+ ThemeProperties::COLOR_TOOLBAR_VERTICAL_SEPARATOR)));
SkColor text_color = GetTextColor();
if (dangerous_download_label_)
« no previous file with comments | « chrome/browser/ui/views/certificate_selector_browsertest.cc ('k') | chrome/browser/ui/views/dropdown_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698