Lines Matching refs:alias
118 fn put(&mut self, caller_uid: u32, alias: &str, entry: &[u8]) -> Result<()> { in put()
122 params![caller_uid, alias, entry,], in put()
129 fn get(&mut self, caller_uid: u32, alias: &str) -> Result<Option<Vec<u8>>> { in get()
133 params![caller_uid, alias], in get()
141 fn remove(&mut self, caller_uid: u32, alias: &str) -> Result<bool> { in remove()
145 params![caller_uid, alias], in remove()
308 fn get(&self, alias: &str, uid: i32) -> Result<Vec<u8>> { in get()
312 if let Some(entry) = db.get(uid, alias).context("In get: Trying to load entry from DB.")? { in get()
315 if self.get_legacy(uid, alias).context("In get: Trying to migrate legacy blob.")? { in get()
318 db.get(uid, alias).context("In get: Trying to load entry from DB.")? in get()
326 fn put(&self, alias: &str, uid: i32, entry: &[u8]) -> Result<()> { in put()
330 let _ = self.get_legacy(uid, alias); in put()
332 db.put(uid, alias, entry).context("In put: Trying to insert entry into DB.") in put()
335 fn remove(&self, alias: &str, uid: i32) -> Result<()> { in remove()
340 let _ = self.get_legacy(uid, alias); in remove()
342 db.remove(uid, alias).context("In remove: Trying to remove entry from DB.")?; in remove()
423 fn get_legacy(&self, uid: u32, alias: &str) -> Result<bool> { in get_legacy()
424 let alias = alias.to_string(); in get_legacy() localVariable
426 if state.recently_imported.contains(&(uid, alias.clone())) { in get_legacy()
431 Self::migrate_one_legacy_entry(uid, &alias, &state.legacy_loader, &mut db) in get_legacy()
434 state.recently_imported.insert((uid, alias)); in get_legacy()
447 for alias in entries.iter() { in bulk_delete_uid()
448 if let Err(e) = state.legacy_loader.remove_legacy_keystore_entry(uid, alias) { in bulk_delete_uid()
463 for alias in entries.iter() { in bulk_delete_user()
464 if let Err(e) = state.legacy_loader.remove_legacy_keystore_entry(*uid, alias) { in bulk_delete_user()
475 alias: &str, in migrate_one_legacy_entry()
480 .read_legacy_keystore_entry(uid, alias) in migrate_one_legacy_entry()
483 db.put(uid, alias, &entry) in migrate_one_legacy_entry()
486 .remove_legacy_keystore_entry(uid, alias) in migrate_one_legacy_entry()
502 fn get(&self, alias: &str, uid: i32) -> BinderResult<Vec<u8>> { in get()
504 map_or_log_err(self.legacy_keystore.get(alias, uid), Ok) in get()
506 fn put(&self, alias: &str, uid: i32, entry: &[u8]) -> BinderResult<()> { in put()
508 map_or_log_err(self.legacy_keystore.put(alias, uid, entry), Ok) in put()
510 fn remove(&self, alias: &str, uid: i32) -> BinderResult<()> { in remove()
512 map_or_log_err(self.legacy_keystore.remove(alias, uid), Ok) in remove()
646 let alias = format!("test_alias_{}", count); in concurrent_legacy_keystore_entry_test() localVariable
647 db.put(1, &alias, TEST_BLOB1).expect("Failed to add entry (1)."); in concurrent_legacy_keystore_entry_test()
659 let alias = format!("test_alias_{}", count); in concurrent_legacy_keystore_entry_test() localVariable
660 db.put(2, &alias, TEST_BLOB2).expect("Failed to add entry (2)."); in concurrent_legacy_keystore_entry_test()
668 let alias = format!("test_alias_{}", count); in concurrent_legacy_keystore_entry_test() localVariable
669 db.remove(2, &alias).expect("Remove Failed (2)."); in concurrent_legacy_keystore_entry_test()
682 let alias = format!("test_alias_{}", count); in concurrent_legacy_keystore_entry_test() localVariable
683 db.remove(1, &alias).expect("Remove Failed (1))."); in concurrent_legacy_keystore_entry_test()