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

Unified Diff: ui/native_theme/common_theme.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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
« no previous file with comments | « ui/native_theme/common_theme.h ('k') | ui/native_theme/native_theme_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/common_theme.cc
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
index ab72df6dd66187a46fa484e110631bf421859193..7b5c6ee4a0c17db317c51bcd35e909fd7b628f49 100644
--- a/ui/native_theme/common_theme.cc
+++ b/ui/native_theme/common_theme.cc
@@ -5,6 +5,7 @@
#include "ui/native_theme/common_theme.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/resource/resource_bundle.h"
@@ -435,13 +436,13 @@ void CommonThemePaintMenuItemBackground(
}
// static
-scoped_ptr<gfx::Canvas> CommonThemeCreateCanvas(SkCanvas* sk_canvas) {
+std::unique_ptr<gfx::Canvas> CommonThemeCreateCanvas(SkCanvas* sk_canvas) {
// TODO(pkotwicz): Do something better and don't infer device
// scale factor from canvas scale.
SkMatrix m = sk_canvas->getTotalMatrix();
float device_scale = static_cast<float>(SkScalarAbs(m.getScaleX()));
- return make_scoped_ptr(new gfx::Canvas(skia::SharePtr(sk_canvas),
- device_scale));
+ return base::WrapUnique(
+ new gfx::Canvas(skia::SharePtr(sk_canvas), device_scale));
}
} // namespace ui
« no previous file with comments | « ui/native_theme/common_theme.h ('k') | ui/native_theme/native_theme_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698