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

Unified Diff: ui/compositor/layer.cc

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 31946b9ecefb6c404f30ab09e84636b6a7562ebf..7300ca9315ad972733209ef24ab125805eef8cc8 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -804,6 +804,7 @@ void Layer::SetForceRenderSurface(bool force) {
class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat {
public:
explicit LayerDebugInfo(const std::string& name) : name_(name) {}
+ ~LayerDebugInfo() override {}
void AppendAsTraceFormat(std::string* out) const override {
base::DictionaryValue dictionary;
dictionary.SetString("layer_name", name_);
@@ -811,13 +812,12 @@ class LayerDebugInfo : public base::trace_event::ConvertableToTraceFormat {
}
private:
- ~LayerDebugInfo() override {}
std::string name_;
};
-scoped_refptr<base::trace_event::ConvertableToTraceFormat> Layer::TakeDebugInfo(
+scoped_ptr<base::trace_event::ConvertableToTraceFormat> Layer::TakeDebugInfo(
cc::Layer* layer) {
- return new LayerDebugInfo(name_);
+ return make_scoped_ptr(new LayerDebugInfo(name_));
}
void Layer::CollectAnimators(

Powered by Google App Engine
This is Rietveld 408576698