 Chromium Code Reviews
 Chromium Code Reviews Issue 2845113002:
  Remove raw base::DictionaryValue::SetWithoutPathExpansion in //chrome  (Closed)
    
  
    Issue 2845113002:
  Remove raw base::DictionaryValue::SetWithoutPathExpansion in //chrome  (Closed) 
  | 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..aa65a468c60d38fb607016606f181e02d7714824 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, | 
| + permit.CreateDeepCopy()); | 
| 
vabr (Chromium)
2017/04/28 07:23:40
I thought the best way to do a deep copy is
MakeUn
 
jdoerrie
2017/04/28 08:40:12
Yes, you are right, thank you! I initially didn't
 | 
| } | 
| 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, | 
| + devices.CreateDeepCopy()); | 
| #if defined(OS_CHROMEOS) | 
| // TODO(tengs): Investigate if we can determine if the remote devices were set |