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

Unified Diff: components/exo/surface.cc

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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: components/exo/surface.cc
diff --git a/components/exo/surface.cc b/components/exo/surface.cc
index f5c3860d24325825d57a83c60e8552dfef55927c..e67ca09359dc2c2c40a27a0ff7f12a5acec33014 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -443,9 +443,8 @@ bool Surface::HasSurfaceObserver(const SurfaceObserver* observer) const {
return observers_.HasObserver(observer);
}
-scoped_refptr<base::trace_event::TracedValue> Surface::AsTracedValue() const {
- scoped_refptr<base::trace_event::TracedValue> value =
- new base::trace_event::TracedValue;
+scoped_ptr<base::trace_event::TracedValue> Surface::AsTracedValue() const {
+ auto value = make_scoped_ptr(new base::trace_event::TracedValue);
value->SetString("name", layer()->name());
return value;
}

Powered by Google App Engine
This is Rietveld 408576698