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

Unified Diff: ui/events/latency_info.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
« cc/layers/layer_impl.cc ('K') | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index 841d648ac848138f6f23596568bf7f5c7b41c4eb..12777ca3897731f7584a9f4f80d530d7e5c9be2a 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -84,7 +84,7 @@ bool IsInputLatencyBeginComponent(ui::LatencyComponentType type) {
class LatencyInfoTracedValue
: public base::trace_event::ConvertableToTraceFormat {
public:
- static scoped_refptr<ConvertableToTraceFormat> FromValue(
+ static scoped_ptr<ConvertableToTraceFormat> FromValue(
scoped_ptr<base::Value> value);
void AppendAsTraceFormat(std::string* out) const override;
@@ -98,9 +98,9 @@ class LatencyInfoTracedValue
DISALLOW_COPY_AND_ASSIGN(LatencyInfoTracedValue);
};
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+scoped_ptr<base::trace_event::ConvertableToTraceFormat>
LatencyInfoTracedValue::FromValue(scoped_ptr<base::Value> value) {
- return scoped_refptr<base::trace_event::ConvertableToTraceFormat>(
+ return scoped_ptr<base::trace_event::ConvertableToTraceFormat>(
new LatencyInfoTracedValue(value.release()));
}
@@ -317,7 +317,7 @@ void LatencyInfo::AddLatencyNumberWithTimestampImpl(
}
}
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+scoped_ptr<base::trace_event::ConvertableToTraceFormat>
LatencyInfo::AsTraceableData() {
scoped_ptr<base::DictionaryValue> record_data(new base::DictionaryValue());
for (const auto& lc : latency_components_) {
@@ -337,7 +337,7 @@ LatencyInfo::AsTraceableData() {
return LatencyInfoTracedValue::FromValue(std::move(record_data));
}
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
+scoped_ptr<base::trace_event::ConvertableToTraceFormat>
LatencyInfo::CoordinatesAsTraceableData() {
scoped_ptr<base::ListValue> coordinates(new base::ListValue());
for (size_t i = 0; i < input_coordinates_size_; i++) {
« cc/layers/layer_impl.cc ('K') | « ui/events/latency_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698