| Index: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
|
| index b411a9e039bd06db51243a27b1562e9b96aa529a..4ea500a53eead1f346aacc8c8c58ca38cf170927 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
|
| @@ -182,9 +182,8 @@
|
| return result;
|
| }
|
|
|
| -std::unique_ptr<base::DictionaryValue> ConvertBoundsToValue(
|
| - const gfx::Rect& bounds) {
|
| - auto result = base::MakeUnique<base::DictionaryValue>();
|
| +base::DictionaryValue* ConvertBoundsToValue(const gfx::Rect& bounds) {
|
| + base::DictionaryValue* result = new base::DictionaryValue();
|
| result->SetInteger("left", bounds.x());
|
| result->SetInteger("top", bounds.y());
|
| result->SetInteger("width", bounds.width());
|
| @@ -330,21 +329,23 @@
|
| js_display->SetString("id", base::Int64ToString(display.id()));
|
| js_display->SetString("name",
|
| display_manager->GetDisplayNameForId(display.id()));
|
| - js_display->Set("bounds", ConvertBoundsToValue(display.bounds()));
|
| + base::DictionaryValue* display_bounds =
|
| + ConvertBoundsToValue(display.bounds());
|
| + js_display->Set("bounds", display_bounds);
|
| js_display->SetBoolean("isPrimary", display.id() == primary_id);
|
| js_display->SetBoolean("isInternal", display.IsInternal());
|
| js_display->SetInteger("rotation", display.RotationAsDegree());
|
|
|
| - auto js_resolutions = base::MakeUnique<base::ListValue>();
|
| + base::ListValue* js_resolutions = new base::ListValue();
|
| for (const scoped_refptr<display::ManagedDisplayMode>& display_mode :
|
| display_info.display_modes()) {
|
| js_resolutions->Append(
|
| ConvertDisplayModeToValue(display.id(), display_mode));
|
| }
|
| - js_display->Set("resolutions", std::move(js_resolutions));
|
| + js_display->Set("resolutions", js_resolutions);
|
|
|
| js_display->SetInteger("colorProfileId", display_info.color_profile());
|
| - auto available_color_profiles = base::MakeUnique<base::ListValue>();
|
| + base::ListValue* available_color_profiles = new base::ListValue();
|
| for (const auto& color_profile : display_info.available_color_profiles()) {
|
| const base::string16 profile_name = GetColorProfileName(color_profile);
|
| if (profile_name.empty())
|
| @@ -354,8 +355,7 @@
|
| color_profile_dict->SetString("name", profile_name);
|
| available_color_profiles->Append(std::move(color_profile_dict));
|
| }
|
| - js_display->Set("availableColorProfiles",
|
| - std::move(available_color_profiles));
|
| + js_display->Set("availableColorProfiles", available_color_profiles);
|
|
|
| if (display_manager->GetNumDisplays() > 1) {
|
| // The settings UI must use the resolved display layout to show the
|
|
|