Commit 575c11d4 authored by Jimmy Gong's avatar Jimmy Gong Committed by Commit Bot

Add MessageSender

MessageSender is responsible for sending serialized proto messages
to the remote device.

Bug: 1106937
Test: unit_tests
Change-Id: I6caa3c77c34b7437ea6798ab680411aa0697ee74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2415371
Commit-Queue: Jimmy Gong <jimmyxgong@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808514}
parent fd64fa21
...@@ -31,6 +31,9 @@ static_library("phonehub") { ...@@ -31,6 +31,9 @@ static_library("phonehub") {
"find_my_device_controller.h", "find_my_device_controller.h",
"find_my_device_controller_impl.cc", "find_my_device_controller_impl.cc",
"find_my_device_controller_impl.h", "find_my_device_controller_impl.h",
"message_sender.h",
"message_sender_impl.cc",
"message_sender_impl.h",
"mutable_phone_model.cc", "mutable_phone_model.cc",
"mutable_phone_model.h", "mutable_phone_model.h",
"notification.cc", "notification.cc",
...@@ -116,6 +119,8 @@ static_library("test_support") { ...@@ -116,6 +119,8 @@ static_library("test_support") {
sources = [ sources = [
"fake_connection_manager.cc", "fake_connection_manager.cc",
"fake_connection_manager.h", "fake_connection_manager.h",
"fake_message_sender.cc",
"fake_message_sender.h",
"phone_model_test_util.cc", "phone_model_test_util.cc",
"phone_model_test_util.h", "phone_model_test_util.h",
] ]
...@@ -138,6 +143,7 @@ source_set("unit_tests") { ...@@ -138,6 +143,7 @@ source_set("unit_tests") {
"do_not_disturb_controller_impl_unittest.cc", "do_not_disturb_controller_impl_unittest.cc",
"feature_status_provider_impl_unittest.cc", "feature_status_provider_impl_unittest.cc",
"find_my_device_controller_impl_unittest.cc", "find_my_device_controller_impl_unittest.cc",
"message_sender_unittest.cc",
"mutable_phone_model_unittest.cc", "mutable_phone_model_unittest.cc",
"notification_access_manager_impl_unittest.cc", "notification_access_manager_impl_unittest.cc",
"notification_manager_impl_unittest.cc", "notification_manager_impl_unittest.cc",
...@@ -154,6 +160,7 @@ source_set("unit_tests") { ...@@ -154,6 +160,7 @@ source_set("unit_tests") {
"//base/test:test_support", "//base/test:test_support",
"//chromeos/components/multidevice", "//chromeos/components/multidevice",
"//chromeos/components/multidevice:test_support", "//chromeos/components/multidevice:test_support",
"//chromeos/components/phonehub/proto",
"//chromeos/services/device_sync/public/cpp", "//chromeos/services/device_sync/public/cpp",
"//chromeos/services/device_sync/public/cpp:test_support", "//chromeos/services/device_sync/public/cpp:test_support",
"//chromeos/services/multidevice_setup/public/cpp", "//chromeos/services/multidevice_setup/public/cpp",
......
// 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_message_sender.h"
namespace chromeos {
namespace phonehub {
FakeMessageSender::FakeMessageSender() = default;
FakeMessageSender::~FakeMessageSender() = default;
void FakeMessageSender::SendCrosState(bool notification_enabled) {
cros_states_.push_back(notification_enabled);
}
void FakeMessageSender::SendUpdateNotificationModeRequest(
bool do_not_disturb_enabled) {
update_notification_mode_requests_.push_back(do_not_disturb_enabled);
}
void FakeMessageSender::SendUpdateBatteryModeRequest(
bool battery_saver_mode_enabled) {
update_battery_mode_requests_.push_back(battery_saver_mode_enabled);
}
void FakeMessageSender::SendDismissNotificationRequest(
int64_t notification_id) {
dismiss_notification_requests_.push_back(notification_id);
}
void FakeMessageSender::SendNotificationInlineReplyRequest(
int64_t notification_id,
const base::string16& reply_text) {
notification_inline_reply_requests_.push_back(
std::make_pair(notification_id, reply_text));
}
void FakeMessageSender::SendShowNotificationAccessSetupRequest() {
show_notification_access_setup_count_++;
}
void FakeMessageSender::SendRingDeviceRequest(bool device_ringing_enabled) {
ring_device_requests_.push_back(device_ringing_enabled);
}
size_t FakeMessageSender::GetCrosStateCallCount() const {
return cros_states_.size();
}
size_t FakeMessageSender::GetUpdateNotificationModeRequestCallCount() const {
return update_notification_mode_requests_.size();
}
size_t FakeMessageSender::GetUpdateBatteryModeRequestCallCount() const {
return update_battery_mode_requests_.size();
}
size_t FakeMessageSender::GetDismissNotificationRequestCallCount() const {
return dismiss_notification_requests_.size();
}
size_t FakeMessageSender::GetNotificationInlineReplyRequestCallCount() const {
return notification_inline_reply_requests_.size();
}
size_t FakeMessageSender::GetRingDeviceRequestCallCount() const {
return ring_device_requests_.size();
}
bool FakeMessageSender::GetRecentCrosState() const {
return cros_states_.back();
}
bool FakeMessageSender::GetRecentUpdateNotificationModeRequest() const {
return update_notification_mode_requests_.back();
}
bool FakeMessageSender::GetRecentUpdateBatteryModeRequest() const {
return update_battery_mode_requests_.back();
}
int64_t FakeMessageSender::GetRecentDismissNotificationRequest() const {
return dismiss_notification_requests_.back();
}
const std::pair<int64_t, base::string16>
FakeMessageSender::GetRecentNotificationInlineReplyRequest() const {
return notification_inline_reply_requests_.back();
}
bool FakeMessageSender::GetRecentRingDeviceRequest() const {
return ring_device_requests_.back();
}
} // 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_MESSAGE_SENDER_H_
#define CHROMEOS_COMPONENTS_PHONEHUB_FAKE_MESSAGE_SENDER_H_
#include "chromeos/components/phonehub/message_sender.h"
#include <stdint.h>
#include <string>
#include <vector>
#include "base/strings/string16.h"
namespace chromeos {
namespace phonehub {
class FakeMessageSender : public MessageSender {
public:
FakeMessageSender();
~FakeMessageSender() override;
// MessageSender:
void SendCrosState(bool notification_enabled) override;
void SendUpdateNotificationModeRequest(bool do_not_disturb_enabled) override;
void SendUpdateBatteryModeRequest(bool battery_saver_mode_enabled) override;
void SendDismissNotificationRequest(int64_t notification_id) override;
void SendNotificationInlineReplyRequest(
int64_t notification_id,
const base::string16& reply_text) override;
void SendShowNotificationAccessSetupRequest() override;
void SendRingDeviceRequest(bool device_ringing_enabled) override;
bool GetRecentCrosState() const;
bool GetRecentUpdateNotificationModeRequest() const;
bool GetRecentUpdateBatteryModeRequest() const;
int64_t GetRecentDismissNotificationRequest() const;
const std::pair<int64_t, base::string16>
GetRecentNotificationInlineReplyRequest() const;
bool GetRecentRingDeviceRequest() const;
size_t GetCrosStateCallCount() const;
size_t GetUpdateNotificationModeRequestCallCount() const;
size_t GetUpdateBatteryModeRequestCallCount() const;
size_t GetDismissNotificationRequestCallCount() const;
size_t GetNotificationInlineReplyRequestCallCount() const;
size_t show_notification_access_setup_request_count() const {
return show_notification_access_setup_count_;
}
size_t GetRingDeviceRequestCallCount() const;
private:
std::vector<bool> cros_states_;
std::vector<bool> update_notification_mode_requests_;
std::vector<bool> update_battery_mode_requests_;
std::vector<int64_t> dismiss_notification_requests_;
std::vector<std::pair<int64_t, base::string16>>
notification_inline_reply_requests_;
std::vector<bool> ring_device_requests_;
size_t show_notification_access_setup_count_ = 0;
};
} // namespace phonehub
} // namespace chromeos
#endif // CHROMEOS_COMPONENTS_PHONEHUB_FAKE_MESSAGE_SENDER_H_
\ No newline at end of file
// 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_MESSAGE_SENDER_H_
#define CHROMEOS_COMPONENTS_PHONEHUB_MESSAGE_SENDER_H_
#include <stdint.h>
#include <string>
#include "base/strings/string16.h"
namespace chromeos {
namespace phonehub {
// Provides interface to send messages from the local device (this Chrome OS
// device) to the remote device (user phone).
class MessageSender {
public:
MessageSender(const MessageSender&) = delete;
MessageSender& operator=(const MessageSender&) = delete;
virtual ~MessageSender() = default;
// Sends whether the notification setting is enabled in the Chrome OS device.
virtual void SendCrosState(bool notification_setting_enabled) = 0;
// Requests that the phone enables or disables Do Not Disturb mode.
virtual void SendUpdateNotificationModeRequest(
bool do_not_disturb_enabled) = 0;
// Requests that the phone enables or disables battery power saver mode.
virtual void SendUpdateBatteryModeRequest(
bool battery_saver_mode_enabled) = 0;
// Requests that the phone should dismiss a notification based by the
// |notification_id|.
virtual void SendDismissNotificationRequest(int64_t notification_id) = 0;
// Requests that the phone should send |reply_text| to a notification of
// |notification_id|.
virtual void SendNotificationInlineReplyRequest(
int64_t notification_id,
const base::string16& reply_text) = 0;
// Requests that the phone should show the notification access set up.
virtual void SendShowNotificationAccessSetupRequest() = 0;
// Requests that the phone enables or disables ringing.
virtual void SendRingDeviceRequest(bool device_ringing_enabled) = 0;
protected:
MessageSender() = default;
};
} // namespace phonehub
} // namespace chromeos
#endif // CHROMEOS_COMPONENTS_PHONEHUB_MESSAGE_SENDER_H_
\ No newline at end of file
// 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/message_sender_impl.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "chromeos/components/phonehub/connection_manager.h"
#include "chromeos/components/phonehub/proto/phonehub_api.pb.h"
namespace chromeos {
namespace phonehub {
namespace {
std::string SerializeMessage(proto::MessageType message_type,
const google::protobuf::MessageLite* request) {
// Add two space characters, followed by the serialized proto.
std::string message = base::StrCat({" ", request->SerializeAsString()});
// Replace the first two characters with |message_type| as a 16-bit int.
uint16_t* ptr =
reinterpret_cast<uint16_t*>(const_cast<char*>(message.data()));
*ptr = static_cast<uint16_t>(message_type);
return message;
}
} // namespace
MessageSenderImpl::MessageSenderImpl(ConnectionManager* connection_manager)
: connection_manager_(connection_manager) {
DCHECK(connection_manager_);
}
MessageSenderImpl::~MessageSenderImpl() = default;
void MessageSenderImpl::SendCrosState(bool notification_setting_enabled) {
proto::NotificationSetting is_notification_enabled =
notification_setting_enabled
? proto::NotificationSetting::NOTIFICATIONS_ON
: proto::NotificationSetting::NOTIFICATIONS_OFF;
proto::CrosState request;
request.set_notification_setting(is_notification_enabled);
connection_manager_->SendMessage(
SerializeMessage(proto::MessageType::PROVIDE_CROS_STATE, &request));
}
void MessageSenderImpl::SendUpdateNotificationModeRequest(
bool do_not_disturb_enabled) {
proto::NotificationMode notification_mode =
do_not_disturb_enabled ? proto::NotificationMode::DO_NOT_DISTURB_ON
: proto::NotificationMode::DO_NOT_DISTURB_OFF;
proto::UpdateNotificationModeRequest request;
request.set_notification_mode(notification_mode);
connection_manager_->SendMessage(SerializeMessage(
proto::MessageType::UPDATE_NOTIFICATION_MODE_REQUEST, &request));
}
void MessageSenderImpl::SendUpdateBatteryModeRequest(
bool battery_saver_mode_enabled) {
proto::BatteryMode battery_mode = battery_saver_mode_enabled
? proto::BatteryMode::BATTERY_SAVER_ON
: proto::BatteryMode::BATTERY_SAVER_OFF;
proto::UpdateBatteryModeRequest request;
request.set_battery_mode(battery_mode);
connection_manager_->SendMessage(SerializeMessage(
proto::MessageType::UPDATE_BATTERY_MODE_REQUEST, &request));
}
void MessageSenderImpl::SendDismissNotificationRequest(
int64_t notification_id) {
proto::DismissNotificationRequest request;
request.set_notification_id(notification_id);
connection_manager_->SendMessage(SerializeMessage(
proto::MessageType::DISMISS_NOTIFICATION_REQUEST, &request));
}
void MessageSenderImpl::SendNotificationInlineReplyRequest(
int64_t notification_id,
const base::string16& reply_text) {
proto::NotificationInlineReplyRequest request;
request.set_notification_id(notification_id);
request.set_reply_text(base::UTF16ToUTF8(reply_text));
connection_manager_->SendMessage(SerializeMessage(
proto::MessageType::NOTIFICATION_INLINE_REPLY_REQUEST, &request));
}
void MessageSenderImpl::SendShowNotificationAccessSetupRequest() {
proto::ShowNotificationAccessSetupRequest request;
connection_manager_->SendMessage(SerializeMessage(
proto::MessageType::SHOW_NOTIFICATION_ACCESS_SETUP_REQUEST, &request));
}
void MessageSenderImpl::SendRingDeviceRequest(bool device_ringing_enabled) {
proto::FindMyDeviceRingStatus ringing_enabled =
device_ringing_enabled ? proto::FindMyDeviceRingStatus::RINGING
: proto::FindMyDeviceRingStatus::NOT_RINGING;
proto::RingDeviceRequest request;
request.set_ring_status(ringing_enabled);
connection_manager_->SendMessage(
SerializeMessage(proto::MessageType::RING_DEVICE_REQUEST, &request));
}
} // namespace phonehub
} // namespace chromeos
\ No newline at end of file
// 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_MESSAGE_SENDER_IMPL_H_
#define CHROMEOS_COMPONENTS_PHONEHUB_MESSAGE_SENDER_IMPL_H_
#include "chromeos/components/phonehub/message_sender.h"
#include <stdint.h>
#include <string>
#include "base/strings/string16.h"
namespace chromeos {
namespace phonehub {
class ConnectionManager;
class MessageSenderImpl : public MessageSender {
public:
MessageSenderImpl(ConnectionManager* connection_manager);
~MessageSenderImpl() override;
// MessageSender:
void SendCrosState(bool notification_setting_enabled) override;
void SendUpdateNotificationModeRequest(bool do_not_disturb_enabled) override;
void SendUpdateBatteryModeRequest(bool battery_saver_mode_enabled) override;
void SendDismissNotificationRequest(int64_t notification_id) override;
void SendNotificationInlineReplyRequest(
int64_t notification_id,
const base::string16& reply_text) override;
void SendShowNotificationAccessSetupRequest() override;
void SendRingDeviceRequest(bool device_ringing_enabled) override;
private:
ConnectionManager* connection_manager_;
};
} // namespace phonehub
} // namespace chromeos
#endif // CHROMEOS_COMPONENTS_PHONEHUB_MESSAGE_SENDER_IMPL_H_
\ No newline at end of file
// 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/message_sender_impl.h"
#include <stdint.h>
#include <memory>
#include <string>
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chromeos/components/phonehub/fake_connection_manager.h"
#include "chromeos/components/phonehub/proto/phonehub_api.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace phonehub {
class MessageSenderImplTest : public testing::Test {
protected:
MessageSenderImplTest() = default;
MessageSenderImplTest(const MessageSenderImplTest&) = delete;
MessageSenderImplTest& operator=(const MessageSenderImplTest&) = delete;
~MessageSenderImplTest() override = default;
void SetUp() override {
fake_connection_manager_ = std::make_unique<FakeConnectionManager>();
message_sender_ =
std::make_unique<MessageSenderImpl>(fake_connection_manager_.get());
}
void VerifyMessage(proto::MessageType expected_message_type,
const google::protobuf::MessageLite* expected_request,
const std::string& actual_message) {
// Message types are the first two bytes of |actual_message|. Retrieving
// a uint16_t* from |actual_message.data()| lets us get the first two
// bytes of |actual_message|.
uint16_t* actual_message_uint16t_ptr =
reinterpret_cast<uint16_t*>(const_cast<char*>(actual_message.data()));
EXPECT_EQ(static_cast<uint16_t>(expected_message_type),
*actual_message_uint16t_ptr);
const std::string& expected_proto_message =
expected_request->SerializeAsString();
// The serialized proto message is after the first two bytes of
// |actual_message|.
const std::string actual_proto_message = actual_message.substr(2);
// Expected size is the size of the serialized expected proto string +
// 2 bytes for the proto::MessageType.
EXPECT_EQ(expected_proto_message.size() + 2, actual_message.size());
EXPECT_EQ(expected_proto_message, actual_proto_message);
}
std::unique_ptr<FakeConnectionManager> fake_connection_manager_;
std::unique_ptr<MessageSenderImpl> message_sender_;
};
TEST_F(MessageSenderImplTest, SendCrossState) {
proto::CrosState request;
request.set_notification_setting(
proto::NotificationSetting::NOTIFICATIONS_ON);
message_sender_->SendCrosState(/*notification_enabled=*/true);
VerifyMessage(proto::MessageType::PROVIDE_CROS_STATE, &request,
fake_connection_manager_->sent_messages().back());
}
TEST_F(MessageSenderImplTest, SendUpdateNotificationModeRequest) {
proto::UpdateNotificationModeRequest request;
request.set_notification_mode(proto::NotificationMode::DO_NOT_DISTURB_ON);
message_sender_->SendUpdateNotificationModeRequest(
/*do_not_disturbed_enabled=*/true);
VerifyMessage(proto::MessageType::UPDATE_NOTIFICATION_MODE_REQUEST, &request,
fake_connection_manager_->sent_messages().back());
}
TEST_F(MessageSenderImplTest, SendUpdateBatteryModeRequest) {
proto::UpdateBatteryModeRequest request;
request.set_battery_mode(proto::BatteryMode::BATTERY_SAVER_ON);
message_sender_->SendUpdateBatteryModeRequest(
/*battery_saver_mode_enabled=*/true);
VerifyMessage(proto::MessageType::UPDATE_BATTERY_MODE_REQUEST, &request,
fake_connection_manager_->sent_messages().back());
}
TEST_F(MessageSenderImplTest, SendDismissNotificationRequest) {
const int expected_id = 24;
proto::DismissNotificationRequest request;
request.set_notification_id(expected_id);
message_sender_->SendDismissNotificationRequest(expected_id);
VerifyMessage(proto::MessageType::DISMISS_NOTIFICATION_REQUEST, &request,
fake_connection_manager_->sent_messages().back());
}
TEST_F(MessageSenderImplTest, SendNotificationInlineReplyRequest) {
const int expected_id = 24;
const base::string16 expected_reply(base::UTF8ToUTF16("Test message"));
proto::NotificationInlineReplyRequest request;
request.set_notification_id(expected_id);
request.set_reply_text(base::UTF16ToUTF8(expected_reply));
message_sender_->SendNotificationInlineReplyRequest(expected_id,
expected_reply);
VerifyMessage(proto::MessageType::NOTIFICATION_INLINE_REPLY_REQUEST, &request,
fake_connection_manager_->sent_messages().back());
}
TEST_F(MessageSenderImplTest, SendShowNotificationAccessSetupRequest) {
proto::ShowNotificationAccessSetupRequest request;
message_sender_->SendShowNotificationAccessSetupRequest();
VerifyMessage(proto::MessageType::SHOW_NOTIFICATION_ACCESS_SETUP_REQUEST,
&request, fake_connection_manager_->sent_messages().back());
}
TEST_F(MessageSenderImplTest, SendRingDeviceRequest) {
proto::RingDeviceRequest request;
request.set_ring_status(proto::FindMyDeviceRingStatus::RINGING);
message_sender_->SendRingDeviceRequest(/*device_ringing_enabled=*/true);
VerifyMessage(proto::MessageType::RING_DEVICE_REQUEST, &request,
fake_connection_manager_->sent_messages().back());
}
} // namespace phonehub
} // namespace chromeos
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "chromeos/components/phonehub/do_not_disturb_controller_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/feature_status_provider_impl.h"
#include "chromeos/components/phonehub/find_my_device_controller_impl.h" #include "chromeos/components/phonehub/find_my_device_controller_impl.h"
#include "chromeos/components/phonehub/message_sender_impl.h"
#include "chromeos/components/phonehub/mutable_phone_model.h" #include "chromeos/components/phonehub/mutable_phone_model.h"
#include "chromeos/components/phonehub/notification_access_manager_impl.h" #include "chromeos/components/phonehub/notification_access_manager_impl.h"
#include "chromeos/components/phonehub/notification_manager_impl.h" #include "chromeos/components/phonehub/notification_manager_impl.h"
...@@ -33,6 +34,8 @@ PhoneHubManagerImpl::PhoneHubManagerImpl( ...@@ -33,6 +34,8 @@ PhoneHubManagerImpl::PhoneHubManagerImpl(
device_sync_client, device_sync_client,
multidevice_setup_client, multidevice_setup_client,
connection_manager_.get())), connection_manager_.get())),
message_sender_(
std::make_unique<MessageSenderImpl>(connection_manager_.get())),
connection_scheduler_(std::make_unique<ConnectionSchedulerImpl>( connection_scheduler_(std::make_unique<ConnectionSchedulerImpl>(
connection_manager_.get(), connection_manager_.get(),
feature_status_provider_.get())), feature_status_provider_.get())),
...@@ -93,6 +96,7 @@ void PhoneHubManagerImpl::Shutdown() { ...@@ -93,6 +96,7 @@ void PhoneHubManagerImpl::Shutdown() {
notification_access_manager_.reset(); notification_access_manager_.reset();
find_my_device_controller_.reset(); find_my_device_controller_.reset();
connection_scheduler_.reset(); connection_scheduler_.reset();
message_sender_.reset();
feature_status_provider_.reset(); feature_status_provider_.reset();
connection_manager_.reset(); connection_manager_.reset();
do_not_disturb_controller_.reset(); do_not_disturb_controller_.reset();
......
...@@ -29,7 +29,7 @@ class SecureChannelClient; ...@@ -29,7 +29,7 @@ class SecureChannelClient;
namespace phonehub { namespace phonehub {
class ConnectionManager; class ConnectionManager;
class ConnectionScheduler; class MessageSender;
// Implemented as a KeyedService which is keyed by the primary Profile. // Implemented as a KeyedService which is keyed by the primary Profile.
class PhoneHubManagerImpl : public PhoneHubManager, public KeyedService { class PhoneHubManagerImpl : public PhoneHubManager, public KeyedService {
...@@ -59,6 +59,7 @@ class PhoneHubManagerImpl : public PhoneHubManager, public KeyedService { ...@@ -59,6 +59,7 @@ class PhoneHubManagerImpl : public PhoneHubManager, public KeyedService {
std::unique_ptr<DoNotDisturbController> do_not_disturb_controller_; std::unique_ptr<DoNotDisturbController> do_not_disturb_controller_;
std::unique_ptr<ConnectionManager> connection_manager_; std::unique_ptr<ConnectionManager> connection_manager_;
std::unique_ptr<FeatureStatusProvider> feature_status_provider_; std::unique_ptr<FeatureStatusProvider> feature_status_provider_;
std::unique_ptr<MessageSender> message_sender_;
std::unique_ptr<ConnectionScheduler> connection_scheduler_; std::unique_ptr<ConnectionScheduler> connection_scheduler_;
std::unique_ptr<FindMyDeviceController> find_my_device_controller_; std::unique_ptr<FindMyDeviceController> find_my_device_controller_;
std::unique_ptr<NotificationAccessManager> notification_access_manager_; 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