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

Unified Diff: chrome/browser/extensions/display_info_provider_chromeos.cc

Issue 1819533002: Convert ScopedVector<DisplayPlacement> to std::vector<DisplayPlacement> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jsonrefactor
Patch Set: Created 4 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
Index: chrome/browser/extensions/display_info_provider_chromeos.cc
diff --git a/chrome/browser/extensions/display_info_provider_chromeos.cc b/chrome/browser/extensions/display_info_provider_chromeos.cc
index 89f3339113fdf655198e4cfc369d1a982a1518c4..aeab49977052ad960d4de263a18689ea9a62bf65 100644
--- a/chrome/browser/extensions/display_info_provider_chromeos.cc
+++ b/chrome/browser/extensions/display_info_provider_chromeos.cc
@@ -97,7 +97,7 @@ bool PointIsOverRadiusVector(const gfx::Point& point,
//
// The rectangle shares an egde with the reference's bottom edge, but it's
// center point is in the left area.
-scoped_ptr<ash::DisplayPlacement> CreatePlacementForRectangles(
+ash::DisplayPlacement CreatePlacementForRectangles(
const gfx::Rect& reference,
const gfx::Rect& rectangle) {
// Translate coordinate system so origin is in the reference's top left point
@@ -153,7 +153,7 @@ scoped_ptr<ash::DisplayPlacement> CreatePlacementForRectangles(
position == ash::DisplayPlacement::RIGHT)
? rectangle.y()
: rectangle.x();
- return make_scoped_ptr(new ash::DisplayPlacement(position, offset));
+ return ash::DisplayPlacement(position, offset);
}
// Updates the display layout for the target display in reference to the primary
@@ -162,13 +162,13 @@ void UpdateDisplayLayout(const gfx::Rect& primary_display_bounds,
int64_t primary_display_id,
const gfx::Rect& target_display_bounds,
int64_t target_display_id) {
- scoped_ptr<ash::DisplayPlacement> placement(CreatePlacementForRectangles(
+ ash::DisplayPlacement placement(CreatePlacementForRectangles(
primary_display_bounds, target_display_bounds));
- placement->display_id = target_display_id;
- placement->parent_display_id = primary_display_id;
+ placement.display_id = target_display_id;
+ placement.parent_display_id = primary_display_id;
scoped_ptr<ash::DisplayLayout> layout(new ash::DisplayLayout);
- layout->placement_list.push_back(std::move(placement));
+ layout->placement_list.push_back(placement);
layout->primary_id = primary_display_id;
ash::Shell::GetInstance()

Powered by Google App Engine
This is Rietveld 408576698