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

Unified Diff: ui/events/latency_info.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/events/latency_info.h ('k') | ui/events/ozone/device/device_manager.h » ('j') | 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 6731c111984aba3218e73c4f21031a4c7baa5939..b5d99547465c4dbc0a3e7fcfd5ad049572e5ea5c 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -84,8 +84,8 @@ bool IsInputLatencyBeginComponent(ui::LatencyComponentType type) {
class LatencyInfoTracedValue
: public base::trace_event::ConvertableToTraceFormat {
public:
- static scoped_ptr<ConvertableToTraceFormat> FromValue(
- scoped_ptr<base::Value> value);
+ static std::unique_ptr<ConvertableToTraceFormat> FromValue(
+ std::unique_ptr<base::Value> value);
void AppendAsTraceFormat(std::string* out) const override;
@@ -93,14 +93,14 @@ class LatencyInfoTracedValue
explicit LatencyInfoTracedValue(base::Value* value);
~LatencyInfoTracedValue() override;
- scoped_ptr<base::Value> value_;
+ std::unique_ptr<base::Value> value_;
DISALLOW_COPY_AND_ASSIGN(LatencyInfoTracedValue);
};
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
-LatencyInfoTracedValue::FromValue(scoped_ptr<base::Value> value) {
- return scoped_ptr<base::trace_event::ConvertableToTraceFormat>(
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
+LatencyInfoTracedValue::FromValue(std::unique_ptr<base::Value> value) {
+ return std::unique_ptr<base::trace_event::ConvertableToTraceFormat>(
new LatencyInfoTracedValue(value.release()));
}
@@ -314,12 +314,13 @@ void LatencyInfo::AddLatencyNumberWithTimestampImpl(
}
}
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
LatencyInfo::AsTraceableData() {
- scoped_ptr<base::DictionaryValue> record_data(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> record_data(
+ new base::DictionaryValue());
for (const auto& lc : latency_components_) {
- scoped_ptr<base::DictionaryValue>
- component_info(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> component_info(
+ new base::DictionaryValue());
component_info->SetDouble("comp_id", static_cast<double>(lc.first.second));
component_info->SetDouble(
"time",
@@ -334,11 +335,11 @@ LatencyInfo::AsTraceableData() {
return LatencyInfoTracedValue::FromValue(std::move(record_data));
}
-scoped_ptr<base::trace_event::ConvertableToTraceFormat>
+std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
LatencyInfo::CoordinatesAsTraceableData() {
- scoped_ptr<base::ListValue> coordinates(new base::ListValue());
+ std::unique_ptr<base::ListValue> coordinates(new base::ListValue());
for (size_t i = 0; i < input_coordinates_size_; i++) {
- scoped_ptr<base::DictionaryValue> coordinate_pair(
+ std::unique_ptr<base::DictionaryValue> coordinate_pair(
new base::DictionaryValue());
coordinate_pair->SetDouble("x", input_coordinates_[i].x);
coordinate_pair->SetDouble("y", input_coordinates_[i].y);
« no previous file with comments | « ui/events/latency_info.h ('k') | ui/events/ozone/device/device_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698