Lines Matching refs:id
116 int id = 0; in AllocateId() local
118 if (paired_device_cache_.Get(mac_address, &id)) { in AllocateId()
119 return id; in AllocateId()
121 if (temporary_device_cache_.Get(mac_address, &id)) { in AllocateId()
122 return id; in AllocateId()
133 id = next_id_++; in AllocateId()
134 id_set_.insert(id); in AllocateId()
135 auto evicted = temporary_device_cache_.Put(mac_address, id); in AllocateId()
143 return id; in AllocateId()
149 int id = 0; in SaveDevice() local
150 if (paired_device_cache_.Get(mac_address, &id)) { in SaveDevice()
153 if (!temporary_device_cache_.Get(mac_address, &id)) { in SaveDevice()
164 auto evicted = paired_device_cache_.Put(mac_address, id); in SaveDevice()
168 if (!save_id_callback_(mac_address, id)) { in SaveDevice()
179 int id = 0; in ForgetDevice() local
180 if (!paired_device_cache_.Get(mac_address, &id)) { in ForgetDevice()
191 ForgetDevicePostprocess(mac_address, id); in ForgetDevice()
194 bool MetricIdAllocator::IsValidId(const int id) { in IsValidId() argument
195 return id >= kMinId && id <= kMaxId; in IsValidId()
199 const int id) { in ForgetDevicePostprocess() argument
200 id_set_.erase(id); in ForgetDevicePostprocess()
201 forget_device_callback_(mac_address, id); in ForgetDevicePostprocess()