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

Unified Diff: chrome/browser/supervised_user/supervised_user_pref_store_unittest.cc

Issue 2888073002: Remove raw DictionaryValue::Set in //chrome (Closed)
Patch Set: Fix Tests Created 3 years, 7 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/supervised_user/supervised_user_pref_store_unittest.cc
diff --git a/chrome/browser/supervised_user/supervised_user_pref_store_unittest.cc b/chrome/browser/supervised_user/supervised_user_pref_store_unittest.cc
index 813be5204bbaccd9b4fc5c9cab5c22268cc2d852..2f6008054308bae3c22f6f0ce1ef576c40b51209 100644
--- a/chrome/browser/supervised_user/supervised_user_pref_store_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_pref_store_unittest.cc
@@ -5,6 +5,7 @@
#include <set>
#include <string>
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "chrome/browser/net/safe_search_util.h"
@@ -59,7 +60,7 @@ void SupervisedUserPrefStoreFixture::OnPrefValueChanged(
const std::string& key) {
const base::Value* value = NULL;
ASSERT_TRUE(pref_store_->GetValue(key, &value));
- changed_prefs_.Set(key, value->DeepCopy());
+ changed_prefs_.Set(key, base::MakeUnique<base::Value>(*value));
}
void SupervisedUserPrefStoreFixture::OnInitializationCompleted(bool succeeded) {

Powered by Google App Engine
This is Rietveld 408576698