Commit 49e68b12 authored by Jimmy Gong's avatar Jimmy Gong Committed by Commit Bot

Add ConnectionManager class

- This class exposes an AttemptConnection() function to connect the
  local Chrome OS to a remote phone device.
- Also exposes a GetStatus() function to retrieve the current status
  of the connection.

Bug: 1106937
Test: unit_tests
Change-Id: I2851cd28ba83034af8c2bddcc17f5a50ddd0c90c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387149
Commit-Queue: Jimmy Gong <jimmyxgong@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804098}
parent 0e42201e
......@@ -8,6 +8,7 @@
#include "chrome/browser/chromeos/device_sync/device_sync_client_factory.h"
#include "chrome/browser/chromeos/multidevice_setup/multidevice_setup_client_factory.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/secure_channel/secure_channel_client_provider.h"
#include "chrome/browser/profiles/profile.h"
#include "chromeos/components/phonehub/notification_access_manager_impl.h"
#include "chromeos/components/phonehub/phone_hub_manager_impl.h"
......@@ -78,7 +79,8 @@ KeyedService* PhoneHubManagerFactory::BuildServiceInstanceFor(
PhoneHubManagerImpl* phone_hub_manager = new PhoneHubManagerImpl(
profile->GetPrefs(),
device_sync::DeviceSyncClientFactory::GetForProfile(profile),
multidevice_setup::MultiDeviceSetupClientFactory::GetForProfile(profile));
multidevice_setup::MultiDeviceSetupClientFactory::GetForProfile(profile),
secure_channel::SecureChannelClientProvider::GetInstance()->GetClient());
// Provide |phone_hub_manager| to the system tray so that it can be used by
// the UI.
......
......@@ -10,6 +10,10 @@ static_library("phonehub") {
sources = [
"browser_tabs_model.cc",
"browser_tabs_model.h",
"connection_manager.cc",
"connection_manager.h",
"connection_manager_impl.cc",
"connection_manager_impl.h",
"do_not_disturb_controller.cc",
"do_not_disturb_controller.h",
"do_not_disturb_controller_impl.cc",
......@@ -59,6 +63,8 @@ static_library("phonehub") {
"//chromeos/components/multidevice/logging",
"//chromeos/services/device_sync/public/cpp",
"//chromeos/services/multidevice_setup/public/cpp",
"//chromeos/services/secure_channel/public/cpp/client",
"//chromeos/services/secure_channel/public/mojom",
"//components/keyed_service/core",
"//components/prefs",
"//device/bluetooth",
......@@ -67,6 +73,7 @@ static_library("phonehub") {
]
}
# Sources only include files used in the debug UI.
static_library("debug") {
sources = [
"fake_do_not_disturb_controller.cc",
......@@ -94,6 +101,8 @@ static_library("test_support") {
testonly = true
sources = [
"fake_connection_manager.cc",
"fake_connection_manager.h",
"phone_model_test_util.cc",
"phone_model_test_util.h",
]
......@@ -111,6 +120,7 @@ source_set("unit_tests") {
sources = [
"browser_tabs_model_unittest.cc",
"connection_manager_impl_unittest.cc",
"do_not_disturb_controller_impl_unittest.cc",
"feature_status_provider_impl_unittest.cc",
"find_my_device_controller_impl_unittest.cc",
......@@ -133,6 +143,7 @@ source_set("unit_tests") {
"//chromeos/services/device_sync/public/cpp:test_support",
"//chromeos/services/multidevice_setup/public/cpp",
"//chromeos/services/multidevice_setup/public/cpp:test_support",
"//chromeos/services/secure_channel/public/cpp/client:test_support",
"//components/prefs:test_support",
"//device/bluetooth:mocks",
"//testing/gtest",
......
......@@ -2,6 +2,7 @@ include_rules = [
"+chromeos/components/multidevice",
"+chromeos/services/device_sync/public/cpp",
"+chromeos/services/multidevice_setup/public/cpp",
"+chromeos/services/secure_channel/public/cpp/client",
"+components/keyed_service/core/keyed_service.h",
"+components/prefs",
"+device/bluetooth",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/phonehub/connection_manager.h"
namespace chromeos {
namespace phonehub {
ConnectionManager::ConnectionManager() = default;
ConnectionManager::~ConnectionManager() = default;
void ConnectionManager::AddObserver(Observer* observer) {
observer_list_.AddObserver(observer);
}
void ConnectionManager::RemoveObserver(Observer* observer) {
observer_list_.RemoveObserver(observer);
}
void ConnectionManager::NotifyStatusChanged() {
for (auto& observer : observer_list_)
observer.OnStatusChanged();
}
std::ostream& operator<<(std::ostream& stream,
ConnectionManager::Status status) {
switch (status) {
case ConnectionManager::Status::kConnecting:
stream << "[Connecting]";
break;
case ConnectionManager::Status::kConnected:
stream << "[Connected]";
break;
case ConnectionManager::Status::kDisconnected:
stream << "[Disconnected]";
break;
}
return stream;
}
} // namespace phonehub
} // namespace chromeos
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_COMPONENTS_PHONEHUB_CONNECTION_MANAGER_H_
#define CHROMEOS_COMPONENTS_PHONEHUB_CONNECTION_MANAGER_H_
#include <ostream>
#include "base/observer_list.h"
#include "base/observer_list_types.h"
namespace chromeos {
namespace phonehub {
// Responsible for creating and maintaining a connection to the user's phone.
class ConnectionManager {
public:
enum class Status {
// Disconnected from the host phone.
kDisconnected,
// Initiating a connection to the host phone.
kConnecting,
// Connected to the host phone.
kConnected,
};
class Observer : public base::CheckedObserver {
public:
~Observer() override = default;
// Called the status has changed; use GetStatus() to get the new status.
virtual void OnStatusChanged() = 0;
};
ConnectionManager(const ConnectionManager&) = delete;
ConnectionManager* operator=(const ConnectionManager&) = delete;
virtual ~ConnectionManager();
virtual Status GetStatus() const = 0;
// Initiates a connection to the host phone. The local device
// (e.g. this chromebook) must have Bluetooth enabled in order to bootstrap
// the connection.
virtual void AttemptConnection() = 0;
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
protected:
ConnectionManager();
void NotifyStatusChanged();
private:
base::ObserverList<Observer> observer_list_;
};
std::ostream& operator<<(std::ostream& stream,
ConnectionManager::Status status);
} // namespace phonehub
} // namespace chromeos
#endif // CHROMEOS_COMPONENTS_PHONEHUB_CONNECTION_MANAGER_H_
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/phonehub/connection_manager_impl.h"
#include "chromeos/services/device_sync/public/cpp/device_sync_client.h"
#include "chromeos/services/multidevice_setup/public/cpp/multidevice_setup_client.h"
#include "chromeos/services/secure_channel/public/cpp/client/secure_channel_client.h"
namespace chromeos {
namespace phonehub {
namespace {
const char kPhoneHubFeatureName[] = "phone_hub";
} // namespace
ConnectionManagerImpl::ConnectionManagerImpl(
multidevice_setup::MultiDeviceSetupClient* multidevice_setup_client,
device_sync::DeviceSyncClient* device_sync_client,
chromeos::secure_channel::SecureChannelClient* secure_channel_client)
: multidevice_setup_client_(multidevice_setup_client),
device_sync_client_(device_sync_client),
secure_channel_client_(secure_channel_client) {
DCHECK(multidevice_setup_client_);
DCHECK(device_sync_client_);
DCHECK(secure_channel_client_);
}
ConnectionManagerImpl::~ConnectionManagerImpl() {
if (channel_)
channel_->RemoveObserver(this);
}
ConnectionManager::Status ConnectionManagerImpl::GetStatus() const {
// Connection attempt was successful and with an active channel between
// devices.
if (channel_)
return Status::kConnected;
// Initiated an connection attempt and awaiting result.
if (connection_attempt_)
return Status::kConnecting;
// No connection attempt has been made or if either local or host device
// has disconnected.
return Status::kDisconnected;
}
void ConnectionManagerImpl::AttemptConnection() {
if (GetStatus() != Status::kDisconnected) {
PA_LOG(WARNING) << "Connection to phone already established or is "
<< "currently attempting to establish, exiting "
<< "AttemptConnection().";
return;
}
const base::Optional<multidevice::RemoteDeviceRef> remote_device =
multidevice_setup_client_->GetHostStatus().second;
const base::Optional<multidevice::RemoteDeviceRef> local_device =
device_sync_client_->GetLocalDeviceMetadata();
if (!remote_device || !local_device) {
PA_LOG(ERROR) << "AttemptConnection() failed because either remote or "
<< "local device is null.";
return;
}
connection_attempt_ = secure_channel_client_->InitiateConnectionToDevice(
*remote_device, *local_device, kPhoneHubFeatureName,
chromeos::secure_channel::ConnectionPriority::kMedium);
connection_attempt_->SetDelegate(this);
NotifyStatusChanged();
}
void ConnectionManagerImpl::OnConnectionAttemptFailure(
chromeos::secure_channel::mojom::ConnectionAttemptFailureReason reason) {
PA_LOG(WARNING) << "AttemptConnection() failed to establish connection.";
connection_attempt_.reset();
NotifyStatusChanged();
}
void ConnectionManagerImpl::OnConnection(
std::unique_ptr<chromeos::secure_channel::ClientChannel> channel) {
PA_LOG(VERBOSE) << "AttemptConnection() successfully established a "
<< "connection between local and remote device.";
channel_ = std::move(channel);
channel_->AddObserver(this);
NotifyStatusChanged();
}
void ConnectionManagerImpl::OnDisconnected() {
connection_attempt_.reset();
channel_->RemoveObserver(this);
channel_.reset();
NotifyStatusChanged();
}
void ConnectionManagerImpl::OnMessageReceived(const std::string& payload) {
// TODO(jimmyxgong): Handle the payload. This is just an empty stub.
}
} // namespace phonehub
} // namespace chromeos
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_COMPONENTS_PHONEHUB_CONNECTION_MANAGER_IMPL_H_
#define CHROMEOS_COMPONENTS_PHONEHUB_CONNECTION_MANAGER_IMPL_H_
#include <memory>
#include "base/optional.h"
#include "chromeos/components/phonehub/connection_manager.h"
#include "chromeos/services/secure_channel/public/cpp/client/client_channel.h"
#include "chromeos/services/secure_channel/public/cpp/client/connection_attempt.h"
#include "chromeos/services/secure_channel/public/mojom/secure_channel.mojom.h"
namespace chromeos {
namespace device_sync {
class DeviceSyncClient;
} // namespace device_sync
namespace multidevice_setup {
class MultiDeviceSetupClient;
} // namespace multidevice_setup
namespace secure_channel {
class SecureChannelClient;
} // namespace secure_channel
namespace phonehub {
// ConnectionManager implementation which utilizes SecureChannelClient to
// establish a connection to a host phone.
class ConnectionManagerImpl
: public ConnectionManager,
public chromeos::secure_channel::ConnectionAttempt::Delegate,
public chromeos::secure_channel::ClientChannel::Observer {
public:
ConnectionManagerImpl(
multidevice_setup::MultiDeviceSetupClient* multidevice_setup_client,
device_sync::DeviceSyncClient* device_sync_client,
chromeos::secure_channel::SecureChannelClient* secure_channel_client);
~ConnectionManagerImpl() override;
// ConnectionManager:
ConnectionManager::Status GetStatus() const override;
void AttemptConnection() override;
private:
// chromeos::secure_channel::ConnectionAttempt::Delegate:
void OnConnectionAttemptFailure(
chromeos::secure_channel::mojom::ConnectionAttemptFailureReason reason)
override;
void OnConnection(std::unique_ptr<chromeos::secure_channel::ClientChannel>
channel) override;
// chromeos::secure_channel::ClientChannel::Observer:
void OnDisconnected() override;
void OnMessageReceived(const std::string& payload) override;
multidevice_setup::MultiDeviceSetupClient* multidevice_setup_client_;
device_sync::DeviceSyncClient* device_sync_client_;
// The entrypoint to the SecureChannel API.
chromeos::secure_channel::SecureChannelClient* secure_channel_client_;
std::unique_ptr<chromeos::secure_channel::ConnectionAttempt>
connection_attempt_;
std::unique_ptr<chromeos::secure_channel::ClientChannel> channel_;
};
} // namespace phonehub
} // namespace chromeos
#endif // CHROMEOS_COMPONENTS_PHONEHUB_CONNECTION_MANAGER_IMPL_H_
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/phonehub/connection_manager_impl.h"
#include <memory>
#include "base/macros.h"
#include "chromeos/components/multidevice/remote_device_test_util.h"
#include "chromeos/services/device_sync/public/cpp/fake_device_sync_client.h"
#include "chromeos/services/multidevice_setup/public/cpp/fake_multidevice_setup_client.h"
#include "chromeos/services/secure_channel/public/cpp/client/fake_client_channel.h"
#include "chromeos/services/secure_channel/public/cpp/client/fake_connection_attempt.h"
#include "chromeos/services/secure_channel/public/cpp/client/fake_secure_channel_client.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace phonehub {
namespace {
using multidevice_setup::mojom::HostStatus;
class FakeObserver : public ConnectionManager::Observer {
public:
FakeObserver() = default;
~FakeObserver() override = default;
size_t num_calls() const { return num_calls_; }
// ConnectionManager::Observer:
void OnStatusChanged() override { ++num_calls_; }
private:
size_t num_calls_ = 0;
};
} // namespace
class ConnectionManagerImplTest : public testing::Test {
protected:
ConnectionManagerImplTest()
: test_remote_device_(
chromeos::multidevice::CreateRemoteDeviceRefForTest()),
test_local_device_(
chromeos::multidevice::CreateRemoteDeviceRefForTest()),
fake_secure_channel_client_(
std::make_unique<
chromeos::secure_channel::FakeSecureChannelClient>()) {}
ConnectionManagerImplTest(const ConnectionManagerImplTest&) = delete;
ConnectionManagerImplTest& operator=(const ConnectionManagerImplTest&) =
delete;
~ConnectionManagerImplTest() override = default;
// testing::Test:
void SetUp() override {
fake_device_sync_client_.set_local_device_metadata(test_local_device_);
fake_multidevice_setup_client_.SetHostStatusWithDevice(
std::make_pair(HostStatus::kHostVerified, test_remote_device_));
connection_manager_ = std::make_unique<ConnectionManagerImpl>(
&fake_multidevice_setup_client_, &fake_device_sync_client_,
fake_secure_channel_client_.get());
connection_manager_->AddObserver(&fake_observer_);
EXPECT_EQ(ConnectionManager::Status::kDisconnected, GetStatus());
}
void TearDown() override {
connection_manager_->RemoveObserver(&fake_observer_);
}
ConnectionManager::Status GetStatus() const {
return connection_manager_->GetStatus();
}
size_t GetNumObserverCalls() const { return fake_observer_.num_calls(); }
void CreateFakeConnectionAttempt() {
auto fake_connection_attempt =
std::make_unique<chromeos::secure_channel::FakeConnectionAttempt>();
fake_connection_attempt_ = fake_connection_attempt.get();
fake_secure_channel_client_->set_next_initiate_connection_attempt(
test_remote_device_, test_local_device_,
std::move(fake_connection_attempt));
}
chromeos::multidevice::RemoteDeviceRef test_remote_device_;
chromeos::multidevice::RemoteDeviceRef test_local_device_;
device_sync::FakeDeviceSyncClient fake_device_sync_client_;
multidevice_setup::FakeMultiDeviceSetupClient fake_multidevice_setup_client_;
std::unique_ptr<chromeos::secure_channel::FakeSecureChannelClient>
fake_secure_channel_client_;
std::unique_ptr<ConnectionManagerImpl> connection_manager_;
FakeObserver fake_observer_;
chromeos::secure_channel::FakeConnectionAttempt* fake_connection_attempt_;
};
TEST_F(ConnectionManagerImplTest, SuccessfullyAttemptConnection) {
CreateFakeConnectionAttempt();
connection_manager_->AttemptConnection();
// Status has been updated to connecting, verify that the status observer
// has been called.
EXPECT_EQ(1u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kConnecting, GetStatus());
auto fake_client_channel =
std::make_unique<chromeos::secure_channel::FakeClientChannel>();
fake_connection_attempt_->NotifyConnection(std::move(fake_client_channel));
// Status has been updated to connected, verify that the status observer has
// been called.
EXPECT_EQ(2u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kConnected, GetStatus());
}
TEST_F(ConnectionManagerImplTest, FailedToAttemptConnection) {
CreateFakeConnectionAttempt();
connection_manager_->AttemptConnection();
// Status has been updated to connecting, verify that the status observer
// has been called.
EXPECT_EQ(1u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kConnecting, GetStatus());
fake_connection_attempt_->NotifyConnectionAttemptFailure(
chromeos::secure_channel::mojom::ConnectionAttemptFailureReason::
AUTHENTICATION_ERROR);
// Status has been updated to disconnected, verify that the status observer
// has been called.
EXPECT_EQ(2u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kDisconnected, GetStatus());
}
TEST_F(ConnectionManagerImplTest, SuccessfulAttemptConnectionButDisconnected) {
CreateFakeConnectionAttempt();
connection_manager_->AttemptConnection();
// Status has been updated to connecting, verify that the status observer
// has been called.
EXPECT_EQ(1u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kConnecting, GetStatus());
auto fake_client_channel =
std::make_unique<chromeos::secure_channel::FakeClientChannel>();
chromeos::secure_channel::FakeClientChannel* fake_client_channel_raw =
fake_client_channel.get();
fake_connection_attempt_->NotifyConnection(std::move(fake_client_channel));
// Status has been updated to connected, verify that the status observer has
// been called.
EXPECT_EQ(2u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kConnected, GetStatus());
// Simulate a disconnected channel.
fake_client_channel_raw->NotifyDisconnected();
// Expect status to be updated to disconnected.
EXPECT_EQ(3u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kDisconnected, GetStatus());
}
TEST_F(ConnectionManagerImplTest, AttemptConnectionWithoutLocalDevice) {
// Simulate a missing local device.
fake_device_sync_client_.set_local_device_metadata(
base::Optional<chromeos::multidevice::RemoteDeviceRef>());
connection_manager_->AttemptConnection();
// Status is still disconnected since there is a missing device, verify that
// the status observer did not get called (exited early).
EXPECT_EQ(0u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kDisconnected, GetStatus());
}
TEST_F(ConnectionManagerImplTest, AttemptConnectionWithoutRemoteDevice) {
// Simulate a missing remote device.
fake_multidevice_setup_client_.SetHostStatusWithDevice(
std::make_pair(HostStatus::kHostVerified,
base::Optional<chromeos::multidevice::RemoteDeviceRef>()));
connection_manager_->AttemptConnection();
// Status is still disconnected since there is a missing device, verify that
// the status observer did not get called (exited early).
EXPECT_EQ(0u, GetNumObserverCalls());
EXPECT_EQ(ConnectionManager::Status::kDisconnected, GetStatus());
}
} // namespace phonehub
} // namespace chromeos
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/phonehub/fake_connection_manager.h"
namespace chromeos {
namespace phonehub {
FakeConnectionManager::FakeConnectionManager()
: status_(Status::kDisconnected) {}
FakeConnectionManager::~FakeConnectionManager() = default;
void FakeConnectionManager::SetStatus(Status status) {
if (status_ == status)
return;
status_ = status;
NotifyStatusChanged();
}
ConnectionManager::Status FakeConnectionManager::GetStatus() const {
return status_;
}
void FakeConnectionManager::AttemptConnection() {
if (status_ == Status::kDisconnected)
SetStatus(Status::kConnecting);
}
} // namespace phonehub
} // namespace chromeos
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_COMPONENTS_PHONEHUB_FAKE_CONNECTION_MANAGER_H_
#define CHROMEOS_COMPONENTS_PHONEHUB_FAKE_CONNECTION_MANAGER_H_
#include "chromeos/components/phonehub/connection_manager.h"
namespace chromeos {
namespace phonehub {
class FakeConnectionManager : public ConnectionManager {
public:
FakeConnectionManager();
~FakeConnectionManager() override;
void SetStatus(Status status);
private:
// ConnectionManager:
Status GetStatus() const override;
void AttemptConnection() override;
Status status_;
};
} // namespace phonehub
} // namespace chromeos
#endif // CHROMEOS_COMPONENTS_PHONEHUB_FAKE_CONNECTION_MANAGER_H_
......@@ -4,6 +4,7 @@
#include "chromeos/components/phonehub/phone_hub_manager_impl.h"
#include "chromeos/components/phonehub/connection_manager_impl.h"
#include "chromeos/components/phonehub/do_not_disturb_controller_impl.h"
#include "chromeos/components/phonehub/feature_status_provider_impl.h"
#include "chromeos/components/phonehub/find_my_device_controller_impl.h"
......@@ -18,9 +19,14 @@ namespace phonehub {
PhoneHubManagerImpl::PhoneHubManagerImpl(
PrefService* pref_service,
device_sync::DeviceSyncClient* device_sync_client,
multidevice_setup::MultiDeviceSetupClient* multidevice_setup_client)
multidevice_setup::MultiDeviceSetupClient* multidevice_setup_client,
chromeos::secure_channel::SecureChannelClient* secure_channel_client)
: do_not_disturb_controller_(
std::make_unique<DoNotDisturbControllerImpl>()),
connection_manager_(
std::make_unique<ConnectionManagerImpl>(multidevice_setup_client,
device_sync_client,
secure_channel_client)),
feature_status_provider_(std::make_unique<FeatureStatusProviderImpl>(
device_sync_client,
multidevice_setup_client)),
......@@ -63,12 +69,15 @@ TetherController* PhoneHubManagerImpl::GetTetherController() {
return tether_controller_.get();
}
// These should be destroyed in the opposite order of how these objects are
// initialized in the constructor.
void PhoneHubManagerImpl::Shutdown() {
tether_controller_.reset();
phone_model_.reset();
notification_access_manager_.reset();
find_my_device_controller_.reset();
feature_status_provider_.reset();
connection_manager_.reset();
do_not_disturb_controller_.reset();
}
......
......@@ -22,15 +22,22 @@ namespace multidevice_setup {
class MultiDeviceSetupClient;
} // namespace multidevice_setup
namespace secure_channel {
class SecureChannelClient;
} // namespace secure_channel
namespace phonehub {
class ConnectionManager;
// Implemented as a KeyedService which is keyed by the primary Profile.
class PhoneHubManagerImpl : public PhoneHubManager, public KeyedService {
public:
PhoneHubManagerImpl(
PrefService* pref_service,
device_sync::DeviceSyncClient* device_sync_client,
multidevice_setup::MultiDeviceSetupClient* multidevice_setup_client);
multidevice_setup::MultiDeviceSetupClient* multidevice_setup_client,
chromeos::secure_channel::SecureChannelClient* secure_channel_client);
~PhoneHubManagerImpl() override;
// PhoneHubManager:
......@@ -47,6 +54,7 @@ class PhoneHubManagerImpl : public PhoneHubManager, public KeyedService {
void Shutdown() override;
std::unique_ptr<DoNotDisturbController> do_not_disturb_controller_;
std::unique_ptr<ConnectionManager> connection_manager_;
std::unique_ptr<FeatureStatusProvider> feature_status_provider_;
std::unique_ptr<FindMyDeviceController> find_my_device_controller_;
std::unique_ptr<NotificationAccessManager> notification_access_manager_;
......
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