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

Unified Diff: chrome/browser/signin/easy_unlock_service_regular.cc

Issue 2845113002: Remove raw base::DictionaryValue::SetWithoutPathExpansion in //chrome (Closed)
Patch Set: Address comments Created 3 years, 8 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/signin/easy_unlock_service_regular.cc
diff --git a/chrome/browser/signin/easy_unlock_service_regular.cc b/chrome/browser/signin/easy_unlock_service_regular.cc
index e316354113955c05796ad9e1dd3498bc88754907..38598e88950e1f0f9e5c21d5efa6065956276891 100644
--- a/chrome/browser/signin/easy_unlock_service_regular.cc
+++ b/chrome/browser/signin/easy_unlock_service_regular.cc
@@ -234,7 +234,8 @@ void EasyUnlockServiceRegular::SetPermitAccess(
const base::DictionaryValue& permit) {
DictionaryPrefUpdate pairing_update(profile()->GetPrefs(),
prefs::kEasyUnlockPairing);
- pairing_update->SetWithoutPathExpansion(kKeyPermitAccess, permit.DeepCopy());
+ pairing_update->SetWithoutPathExpansion(
+ kKeyPermitAccess, base::MakeUnique<base::Value>(permit));
}
void EasyUnlockServiceRegular::ClearPermitAccess() {
@@ -259,7 +260,8 @@ void EasyUnlockServiceRegular::SetRemoteDevices(
if (devices.empty())
pairing_update->RemoveWithoutPathExpansion(kKeyDevices, NULL);
else
- pairing_update->SetWithoutPathExpansion(kKeyDevices, devices.DeepCopy());
+ pairing_update->SetWithoutPathExpansion(
+ kKeyDevices, base::MakeUnique<base::Value>(devices));
#if defined(OS_CHROMEOS)
// TODO(tengs): Investigate if we can determine if the remote devices were set

Powered by Google App Engine
This is Rietveld 408576698