Index: services/preferences/public/cpp/tests/pref_observer_store_unittest.cc |
diff --git a/services/preferences/public/cpp/tests/pref_observer_store_unittest.cc b/services/preferences/public/cpp/tests/pref_observer_store_unittest.cc |
index d18cfbe75cf953f9656202ab7a40c303d99a572d..b12f597014c53a1298f4cfda87914b3c3651ab09 100644 |
--- a/services/preferences/public/cpp/tests/pref_observer_store_unittest.cc |
+++ b/services/preferences/public/cpp/tests/pref_observer_store_unittest.cc |
@@ -35,7 +35,8 @@ class TestPreferenceManager : public prefs::mojom::PreferencesManager { |
// prefs::mojom::TestPreferenceManager: |
void AddObserver(const std::vector<std::string>& preferences, |
prefs::mojom::PreferencesObserverPtr client) override; |
- void SetPreferences(const base::DictionaryValue& preferences) override; |
+ void SetPreferences( |
+ std::unique_ptr<base::DictionaryValue> preferences) override; |
private: |
bool add_observer_called_; |
@@ -55,7 +56,7 @@ void TestPreferenceManager::AddObserver( |
} |
void TestPreferenceManager::SetPreferences( |
- const base::DictionaryValue& preferences) { |
+ std::unique_ptr<base::DictionaryValue> preferences) { |
set_preferences_called_ = true; |
} |
@@ -72,7 +73,7 @@ class PrefObserverStoreTest : public testing::Test { |
bool Initialized() { return store_->initialized_; } |
void OnPreferencesChanged(const base::DictionaryValue& preferences) { |
- store_->OnPreferencesChanged(std::move(preferences)); |
+ store_->OnPreferencesChanged(preferences.CreateDeepCopy()); |
} |
// testing::Test: |