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

Unified Diff: ui/views/border.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « ui/touch_selection/touch_selection_controller_unittest.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/border.cc
diff --git a/ui/views/border.cc b/ui/views/border.cc
index f2eb92ff111f81f89f4daa26b22d8fb85fbee899..153411dc40d61413a70935104fa6856944d2b44a 100644
--- a/ui/views/border.cc
+++ b/ui/views/border.cc
@@ -187,20 +187,19 @@ std::unique_ptr<Border> Border::NullBorder() {
// static
std::unique_ptr<Border> Border::CreateSolidBorder(int thickness,
SkColor color) {
- return base::WrapUnique(new SolidSidedBorder(gfx::Insets(thickness), color));
+ return base::MakeUnique<SolidSidedBorder>(gfx::Insets(thickness), color);
}
// static
std::unique_ptr<Border> Border::CreateEmptyBorder(const gfx::Insets& insets) {
- return base::WrapUnique(new EmptyBorder(insets));
+ return base::MakeUnique<EmptyBorder>(insets);
}
// static
std::unique_ptr<Border> Border::CreateRoundedRectBorder(int thickness,
int corner_radius,
SkColor color) {
- return base::WrapUnique(
- new RoundedRectBorder(thickness, corner_radius, color));
+ return base::MakeUnique<RoundedRectBorder>(thickness, corner_radius, color);
}
// static
@@ -217,8 +216,8 @@ std::unique_ptr<Border> Border::CreateSolidSidedBorder(int top,
int bottom,
int right,
SkColor color) {
- return base::WrapUnique(
- new SolidSidedBorder(gfx::Insets(top, left, bottom, right), color));
+ return base::MakeUnique<SolidSidedBorder>(
+ gfx::Insets(top, left, bottom, right), color);
}
// static
« no previous file with comments | « ui/touch_selection/touch_selection_controller_unittest.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698