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

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
« no previous file with comments | « components/cryptauth/cryptauth_device_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..87880be26a2d09ee29093bd9a68da7f1ede94e9a 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->GetUnlockKeys()) {
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->GetUnlockKeys()) {
unlock_keys->Append(ExternalDeviceInfoToDictionary(unlock_key));
}
@@ -514,13 +514,13 @@ 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->GetUnlockKeys().begin(),
+ device_manager->GetUnlockKeys().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->GetUnlockKeys().end() ||
selected_remote_device_.public_key != device_info.public_key())
return dictionary;
« no previous file with comments | « components/cryptauth/cryptauth_device_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698