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

Unified Diff: cc/layers/ui_resource_layer_impl.cc

Issue 2773513002: Stop passing raw pointers to DictionaryValue::Set, part 1 (Closed)
Patch Set: Fix compilation Created 3 years, 9 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/layer_impl.cc ('k') | cc/quads/nine_patch_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/ui_resource_layer_impl.cc
diff --git a/cc/layers/ui_resource_layer_impl.cc b/cc/layers/ui_resource_layer_impl.cc
index 50d0321fefa7ce1f064704f76641531f8b7b25e9..dd2441bf37bc8a3ad1fd31312310ecde280213e1 100644
--- a/cc/layers/ui_resource_layer_impl.cc
+++ b/cc/layers/ui_resource_layer_impl.cc
@@ -143,17 +143,17 @@ const char* UIResourceLayerImpl::LayerTypeAsString() const {
std::unique_ptr<base::DictionaryValue> UIResourceLayerImpl::LayerTreeAsJson() {
std::unique_ptr<base::DictionaryValue> result = LayerImpl::LayerTreeAsJson();
- result->Set("ImageBounds", MathUtil::AsValue(image_bounds_).release());
+ result->Set("ImageBounds", MathUtil::AsValue(image_bounds_));
- base::ListValue* list = new base::ListValue;
+ auto list = base::MakeUnique<base::ListValue>();
list->AppendDouble(vertex_opacity_[0]);
list->AppendDouble(vertex_opacity_[1]);
list->AppendDouble(vertex_opacity_[2]);
list->AppendDouble(vertex_opacity_[3]);
- result->Set("VertexOpacity", list);
+ result->Set("VertexOpacity", std::move(list));
- result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release());
- result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release());
+ result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_));
+ result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_));
return result;
}
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/quads/nine_patch_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698