| Index: chrome/browser/chromeos/display/display_preferences_unittest.cc
|
| diff --git a/chrome/browser/chromeos/display/display_preferences_unittest.cc b/chrome/browser/chromeos/display/display_preferences_unittest.cc
|
| index 297c286acd46c2f5341eee6d0325b56c2c33cef5..3fd7d20c0104f44220e4a2fcff34a138de7a2d50 100644
|
| --- a/chrome/browser/chromeos/display/display_preferences_unittest.cc
|
| +++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/chromeos/display/display_preferences.h"
|
|
|
| #include <stdint.h>
|
| +
|
| #include <string>
|
| #include <utility>
|
| #include <vector>
|
| @@ -23,6 +24,7 @@
|
| #include "ash/test/display_manager_test_api.h"
|
| #include "ash/wm/maximize_mode/maximize_mode_controller.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/values.h"
|
| @@ -114,7 +116,7 @@ class DisplayPreferencesTest : public ash::test::AshTestBase {
|
| DCHECK(!name.empty());
|
|
|
| base::DictionaryValue* pref_data = update.Get();
|
| - scoped_ptr<base::Value>layout_value(new base::DictionaryValue());
|
| + std::unique_ptr<base::Value> layout_value(new base::DictionaryValue());
|
| if (pref_data->HasKey(name)) {
|
| base::Value* value = nullptr;
|
| if (pref_data->Get(name, &value) && value != nullptr)
|
| @@ -126,7 +128,7 @@ class DisplayPreferencesTest : public ash::test::AshTestBase {
|
|
|
| void StoreDisplayPropertyForList(const ash::DisplayIdList& list,
|
| std::string key,
|
| - scoped_ptr<base::Value> value) {
|
| + std::unique_ptr<base::Value> value) {
|
| std::string name = ash::DisplayIdListToString(list);
|
|
|
| DictionaryPrefUpdate update(&local_state_, prefs::kSecondaryDisplays);
|
| @@ -139,7 +141,7 @@ class DisplayPreferencesTest : public ash::test::AshTestBase {
|
| static_cast<base::DictionaryValue*>(layout_value)
|
| ->Set(key, std::move(value));
|
| } else {
|
| - scoped_ptr<base::DictionaryValue> layout_value(
|
| + std::unique_ptr<base::DictionaryValue> layout_value(
|
| new base::DictionaryValue());
|
| layout_value->SetBoolean(key, value != nullptr);
|
| pref_data->Set(name, layout_value.release());
|
| @@ -150,7 +152,7 @@ class DisplayPreferencesTest : public ash::test::AshTestBase {
|
| const std::string& key,
|
| bool value) {
|
| StoreDisplayPropertyForList(
|
| - list, key, make_scoped_ptr(new base::FundamentalValue(value)));
|
| + list, key, base::WrapUnique(new base::FundamentalValue(value)));
|
| }
|
|
|
| void StoreDisplayLayoutPrefForList(const ash::DisplayIdList& list,
|
| @@ -205,7 +207,7 @@ class DisplayPreferencesTest : public ash::test::AshTestBase {
|
| MockUserManager* mock_user_manager_; // Not owned.
|
| ScopedUserManagerEnabler user_manager_enabler_;
|
| TestingPrefServiceSimple local_state_;
|
| - scoped_ptr<DisplayConfigurationObserver> observer_;
|
| + std::unique_ptr<DisplayConfigurationObserver> observer_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DisplayPreferencesTest);
|
| };
|
| @@ -283,7 +285,8 @@ TEST_F(DisplayPreferencesTest, BasicStores) {
|
| ash::DisplayLayoutBuilder dummy_layout_builder(id1);
|
| dummy_layout_builder.SetSecondaryPlacement(dummy_id,
|
| ash::DisplayPlacement::LEFT, 20);
|
| - scoped_ptr<ash::DisplayLayout> dummy_layout(dummy_layout_builder.Build());
|
| + std::unique_ptr<ash::DisplayLayout> dummy_layout(
|
| + dummy_layout_builder.Build());
|
| ash::DisplayIdList list = ash::test::CreateDisplayIdList2(id1, dummy_id);
|
| StoreDisplayLayoutPrefForTest(list, *dummy_layout);
|
|
|
| @@ -1018,7 +1021,7 @@ TEST_F(DisplayPreferencesTest, RestoreUnifiedMode) {
|
| StoreDisplayBoolPropertyForList(list, "default_unified", true);
|
| StoreDisplayPropertyForList(
|
| list, "primary-id",
|
| - make_scoped_ptr(new base::StringValue(base::Int64ToString(id1))));
|
| + base::WrapUnique(new base::StringValue(base::Int64ToString(id1))));
|
| LoadDisplayPreferences(false);
|
|
|
| // Should not restore to unified unless unified desktop is enabled.
|
|
|