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

Side by Side Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.cc

Issue 2765363004: Stop passing raw pointers to DictionaryValue::Set, part 2 (Closed)
Patch Set: Fix comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" 5 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // static 111 // static
112 void EasyUnlockKeyManager::DeviceDataToRemoteDeviceDictionary( 112 void EasyUnlockKeyManager::DeviceDataToRemoteDeviceDictionary(
113 const AccountId& account_id, 113 const AccountId& account_id,
114 const EasyUnlockDeviceKeyData& data, 114 const EasyUnlockDeviceKeyData& data,
115 base::DictionaryValue* dict) { 115 base::DictionaryValue* dict) {
116 dict->SetString(kKeyBluetoothAddress, data.bluetooth_address); 116 dict->SetString(kKeyBluetoothAddress, data.bluetooth_address);
117 dict->SetInteger(kKeyBluetoothType, static_cast<int>(data.bluetooth_type)); 117 dict->SetInteger(kKeyBluetoothType, static_cast<int>(data.bluetooth_type));
118 dict->SetString(kKeyPsk, data.psk); 118 dict->SetString(kKeyPsk, data.psk);
119 std::unique_ptr<base::DictionaryValue> permit_record( 119 std::unique_ptr<base::DictionaryValue> permit_record(
120 new base::DictionaryValue); 120 new base::DictionaryValue);
121 dict->Set(kKeyPermitRecord, permit_record.release()); 121 dict->Set(kKeyPermitRecord, std::move(permit_record));
122 dict->SetString(kKeyPermitId, data.public_key); 122 dict->SetString(kKeyPermitId, data.public_key);
123 dict->SetString(kKeyPermitData, data.public_key); 123 dict->SetString(kKeyPermitData, data.public_key);
124 dict->SetString(kKeyPermitType, kPermitTypeLicence); 124 dict->SetString(kKeyPermitType, kPermitTypeLicence);
125 dict->SetString(kKeyPermitPermitId, 125 dict->SetString(kKeyPermitPermitId,
126 base::StringPrintf(kPermitPermitIdFormat, 126 base::StringPrintf(kPermitPermitIdFormat,
127 account_id.GetUserEmail().c_str())); 127 account_id.GetUserEmail().c_str()));
128 } 128 }
129 129
130 // static 130 // static
131 bool EasyUnlockKeyManager::RemoteDeviceDictionaryToDeviceData( 131 bool EasyUnlockKeyManager::RemoteDeviceDictionaryToDeviceData(
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 const EasyUnlockDeviceKeyDataList& fetched_data) { 234 const EasyUnlockDeviceKeyDataList& fetched_data) {
235 if (!callback.is_null()) 235 if (!callback.is_null())
236 callback.Run(fetch_success, fetched_data); 236 callback.Run(fetch_success, fetched_data);
237 237
238 DCHECK(pending_read_operation_); 238 DCHECK(pending_read_operation_);
239 pending_read_operation_.reset(); 239 pending_read_operation_.reset();
240 RunNextOperation(); 240 RunNextOperation();
241 } 241 }
242 242
243 } // namespace chromeos 243 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/url_util.cc ('k') | chrome/browser/chromeos/login/helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698