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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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 6e896de731c3058466150d1ea6f9c12d5de9b24f..72c343a145c7cf3603b73ced9186ca527fc0365c 100644
--- a/chrome/browser/ui/views/download/download_item_view_md.cc
+++ b/chrome/browser/ui/views/download/download_item_view_md.cc
@@ -16,6 +16,7 @@
#include "base/i18n/rtl.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -472,19 +473,20 @@ void DownloadItemViewMd::AddInkDropLayer(ui::Layer* ink_drop_layer) {
layer()->SetMasksToBounds(true);
}
-scoped_ptr<views::InkDropAnimation> DownloadItemViewMd::CreateInkDropAnimation()
- const {
- return make_scoped_ptr(new views::FloodFillInkDropAnimation(
+std::unique_ptr<views::InkDropAnimation>
+DownloadItemViewMd::CreateInkDropAnimation() const {
+ return base::WrapUnique(new views::FloodFillInkDropAnimation(
size(), ink_drop_delegate_.last_ink_drop_location(),
color_utils::DeriveDefaultIconColor(GetTextColor())));
}
-scoped_ptr<views::InkDropHover> DownloadItemViewMd::CreateInkDropHover() const {
+std::unique_ptr<views::InkDropHover> DownloadItemViewMd::CreateInkDropHover()
+ const {
if (IsShowingWarningDialog())
return nullptr;
gfx::Size size = GetPreferredSize();
- return make_scoped_ptr(new views::InkDropHover(
+ return base::WrapUnique(new views::InkDropHover(
size, kInkDropSmallCornerRadius, gfx::Rect(size).CenterPoint(),
color_utils::DeriveDefaultIconColor(GetTextColor())));
}
@@ -793,9 +795,8 @@ void DownloadItemViewMd::UpdateColorsFromTheme() {
if (dangerous_download_label_)
dangerous_download_label_->SetEnabledColor(GetTextColor());
- SetBorder(make_scoped_ptr(new SeparatorBorder(
- GetThemeProvider()->GetColor(
- ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR))));
+ SetBorder(base::WrapUnique(new SeparatorBorder(GetThemeProvider()->GetColor(
+ ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR))));
}
void DownloadItemViewMd::ShowContextMenuImpl(const gfx::Rect& rect,

Powered by Google App Engine
This is Rietveld 408576698