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

Unified Diff: components/proximity_auth/webui/proximity_auth_webui_handler.cc

Issue 2561683002: Update CryptAuthDeviceManager to store all synced devices instead of only unlock keys. (Closed)
Patch Set: tengs@ comments. Created 4 years 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: components/proximity_auth/webui/proximity_auth_webui_handler.cc
diff --git a/components/proximity_auth/webui/proximity_auth_webui_handler.cc b/components/proximity_auth/webui/proximity_auth_webui_handler.cc
index 836cf0a9e07e504eed7b34c7192648b5e1469868..c39ea3238160895f84eb8079aa12e342c3cb9b30 100644
--- a/components/proximity_auth/webui/proximity_auth_webui_handler.cc
+++ b/components/proximity_auth/webui/proximity_auth_webui_handler.cc
@@ -341,7 +341,7 @@ void ProximityAuthWebUIHandler::ToggleConnection(const base::ListValue* args) {
return;
}
- for (const auto& unlock_key : device_manager->unlock_keys()) {
+ for (const auto& unlock_key : device_manager->UnlockKeys()) {
if (unlock_key.public_key() == public_key) {
if (life_cycle_ && selected_remote_device_.public_key == public_key) {
CleanUpRemoteDeviceLifeCycle();
@@ -463,7 +463,7 @@ ProximityAuthWebUIHandler::GetUnlockKeysList() {
if (!device_manager)
return unlock_keys;
- for (const auto& unlock_key : device_manager->unlock_keys()) {
+ for (const auto& unlock_key : device_manager->UnlockKeys()) {
unlock_keys->Append(ExternalDeviceInfoToDictionary(unlock_key));
}
@@ -514,13 +514,12 @@ ProximityAuthWebUIHandler::ExternalDeviceInfoToDictionary(
// status updates).
std::string public_key = device_info.public_key();
auto iterator = std::find_if(
- device_manager->unlock_keys().begin(),
- device_manager->unlock_keys().end(),
+ device_manager->UnlockKeys().begin(), device_manager->UnlockKeys().end(),
[&public_key](const cryptauth::ExternalDeviceInfo& unlock_key) {
return unlock_key.public_key() == public_key;
});
- if (iterator == device_manager->unlock_keys().end() ||
+ if (iterator == device_manager->UnlockKeys().end() ||
selected_remote_device_.public_key != device_info.public_key())
return dictionary;

Powered by Google App Engine
This is Rietveld 408576698