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

Unified Diff: services/preferences/public/cpp/tests/pref_observer_store_unittest.cc

Issue 2577563002: Add struct traits for base::Value. (Closed)
Patch Set: rebase Created 4 years 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 | « services/preferences/public/cpp/pref_observer_store.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 36e6d394b225861403eda20c62f4276680879953..26f948ab5205751dacb37b3fceeda99e6e7b3323 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:
« no previous file with comments | « services/preferences/public/cpp/pref_observer_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698