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

Unified Diff: cc/layers/ui_resource_layer.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: 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
« no previous file with comments | « cc/layers/ui_resource_layer.h ('k') | cc/layers/ui_resource_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/ui_resource_layer.cc
diff --git a/cc/layers/ui_resource_layer.cc b/cc/layers/ui_resource_layer.cc
index 6842851912908a8b77d3fe49a3854a049ff2e44e..de86098ad71110c8458b3404e7d517bc9783aebc 100644
--- a/cc/layers/ui_resource_layer.cc
+++ b/cc/layers/ui_resource_layer.cc
@@ -4,6 +4,7 @@
#include "cc/layers/ui_resource_layer.h"
+#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
#include "cc/layers/ui_resource_layer_impl.h"
#include "cc/resources/scoped_ui_resource.h"
@@ -17,9 +18,10 @@ namespace {
class ScopedUIResourceHolder : public UIResourceLayer::UIResourceHolder {
public:
- static scoped_ptr<ScopedUIResourceHolder> Create(LayerTreeHost* host,
- const SkBitmap& skbitmap) {
- return make_scoped_ptr(new ScopedUIResourceHolder(host, skbitmap));
+ static std::unique_ptr<ScopedUIResourceHolder> Create(
+ LayerTreeHost* host,
+ const SkBitmap& skbitmap) {
+ return base::WrapUnique(new ScopedUIResourceHolder(host, skbitmap));
}
UIResourceId id() override { return resource_->id(); }
@@ -28,13 +30,13 @@ class ScopedUIResourceHolder : public UIResourceLayer::UIResourceHolder {
resource_ = ScopedUIResource::Create(host, UIResourceBitmap(skbitmap));
}
- scoped_ptr<ScopedUIResource> resource_;
+ std::unique_ptr<ScopedUIResource> resource_;
};
class SharedUIResourceHolder : public UIResourceLayer::UIResourceHolder {
public:
- static scoped_ptr<SharedUIResourceHolder> Create(UIResourceId id) {
- return make_scoped_ptr(new SharedUIResourceHolder(id));
+ static std::unique_ptr<SharedUIResourceHolder> Create(UIResourceId id) {
+ return base::WrapUnique(new SharedUIResourceHolder(id));
}
UIResourceId id() override { return id_; }
@@ -63,7 +65,7 @@ UIResourceLayer::UIResourceLayer()
UIResourceLayer::~UIResourceLayer() {}
-scoped_ptr<LayerImpl> UIResourceLayer::CreateLayerImpl(
+std::unique_ptr<LayerImpl> UIResourceLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
return UIResourceLayerImpl::Create(tree_impl, id());
}
« no previous file with comments | « cc/layers/ui_resource_layer.h ('k') | cc/layers/ui_resource_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698