Commit 7b445fc9 authored by James Hawkins's avatar James Hawkins Committed by Commit Bot

Proximity Auth: Remove kMultiDeviceApi flagging from ProximityAuthSystem.

R=hansberry@chromium.org

Bug: 899324
Test: none
Change-Id: I0738957fbcdb63da03152d852cf20e02603f7924
Reviewed-on: https://chromium-review.googlesource.com/c/1325429
Commit-Queue: James Hawkins <jhawkins@chromium.org>
Reviewed-by: default avatarRyan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606518}
parent da8d67a2
...@@ -4,14 +4,10 @@ ...@@ -4,14 +4,10 @@
#include "chromeos/components/proximity_auth/proximity_auth_system.h" #include "chromeos/components/proximity_auth/proximity_auth_system.h"
#include "base/command_line.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chromeos/chromeos_features.h"
#include "chromeos/components/proximity_auth/logging/logging.h" #include "chromeos/components/proximity_auth/logging/logging.h"
#include "chromeos/components/proximity_auth/proximity_auth_client.h" #include "chromeos/components/proximity_auth/proximity_auth_client.h"
#include "chromeos/components/proximity_auth/proximity_auth_profile_pref_manager.h" #include "chromeos/components/proximity_auth/proximity_auth_profile_pref_manager.h"
#include "chromeos/components/proximity_auth/remote_device_life_cycle_impl.h" #include "chromeos/components/proximity_auth/remote_device_life_cycle_impl.h"
#include "chromeos/components/proximity_auth/switches.h"
#include "chromeos/components/proximity_auth/unlock_manager_impl.h" #include "chromeos/components/proximity_auth/unlock_manager_impl.h"
#include "chromeos/services/secure_channel/public/cpp/client/secure_channel_client.h" #include "chromeos/services/secure_channel/public/cpp/client/secure_channel_client.h"
...@@ -76,8 +72,7 @@ void ProximityAuthSystem::SetRemoteDevicesForUser( ...@@ -76,8 +72,7 @@ void ProximityAuthSystem::SetRemoteDevicesForUser(
const cryptauth::RemoteDeviceRefList& remote_devices, const cryptauth::RemoteDeviceRefList& remote_devices,
base::Optional<cryptauth::RemoteDeviceRef> local_device) { base::Optional<cryptauth::RemoteDeviceRef> local_device) {
remote_devices_map_[account_id] = remote_devices; remote_devices_map_[account_id] = remote_devices;
if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi)) local_device_map_.emplace(account_id, *local_device);
local_device_map_.emplace(account_id, *local_device);
if (started_) { if (started_) {
const AccountId& focused_account_id = const AccountId& focused_account_id =
...@@ -170,8 +165,7 @@ void ProximityAuthSystem::OnFocusedUserChanged(const AccountId& account_id) { ...@@ -170,8 +165,7 @@ void ProximityAuthSystem::OnFocusedUserChanged(const AccountId& account_id) {
<< " does not have a Smart Lock host device."; << " does not have a Smart Lock host device.";
return; return;
} }
if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi) && if (local_device_map_.find(account_id) == local_device_map_.end()) {
local_device_map_.find(account_id) == local_device_map_.end()) {
PA_LOG(INFO) << "User " << account_id.Serialize() PA_LOG(INFO) << "User " << account_id.Serialize()
<< " does not have a local device."; << " does not have a local device.";
return; return;
...@@ -182,8 +176,7 @@ void ProximityAuthSystem::OnFocusedUserChanged(const AccountId& account_id) { ...@@ -182,8 +176,7 @@ void ProximityAuthSystem::OnFocusedUserChanged(const AccountId& account_id) {
cryptauth::RemoteDeviceRef remote_device = remote_devices_map_[account_id][0]; cryptauth::RemoteDeviceRef remote_device = remote_devices_map_[account_id][0];
base::Optional<cryptauth::RemoteDeviceRef> local_device; base::Optional<cryptauth::RemoteDeviceRef> local_device;
if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi)) local_device = local_device_map_.at(account_id);
local_device = local_device_map_.at(account_id);
if (!suspended_) { if (!suspended_) {
PA_LOG(INFO) << "Creating RemoteDeviceLifeCycle for focused user: " PA_LOG(INFO) << "Creating RemoteDeviceLifeCycle for focused user: "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment