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

Unified Diff: chromeos/components/tether/keep_alive_scheduler.h

Issue 2918863002: [CrOS Tether] Update the KeepAliveTickle code to receive DeviceStatus updates. (Closed)
Patch Set: hansberry@ comments. Created 3 years, 6 months 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: chromeos/components/tether/keep_alive_scheduler.h
diff --git a/chromeos/components/tether/keep_alive_scheduler.h b/chromeos/components/tether/keep_alive_scheduler.h
index 5cd356e59071feda1baa75f06540ab74e5ef5e87..325cadbc689225417db4ee6e8ea5c88509e93ff3 100644
--- a/chromeos/components/tether/keep_alive_scheduler.h
+++ b/chromeos/components/tether/keep_alive_scheduler.h
@@ -11,12 +11,16 @@
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
#include "chromeos/components/tether/active_host.h"
+#include "chromeos/components/tether/device_status_util.h"
#include "chromeos/components/tether/keep_alive_operation.h"
namespace chromeos {
namespace tether {
+class HostScanCache;
+class DeviceIdTetherNetworkGuidMap;
+
// Schedules keep-alive messages to be sent when this device is connected to a
// remote device's tether hotspot. When a device connects, a keep-alive message
// is sent immediately, then another one is scheduled every 4 minutes until the
@@ -24,8 +28,11 @@ namespace tether {
class KeepAliveScheduler : public ActiveHost::Observer,
public KeepAliveOperation::Observer {
public:
- KeepAliveScheduler(ActiveHost* active_host,
- BleConnectionManager* connection_manager);
+ KeepAliveScheduler(
+ ActiveHost* active_host,
+ BleConnectionManager* connection_manager,
+ HostScanCache* host_scan_cache,
+ DeviceIdTetherNetworkGuidMap* device_id_tether_network_guid_map);
virtual ~KeepAliveScheduler();
// ActiveHost::Observer:
@@ -33,14 +40,19 @@ class KeepAliveScheduler : public ActiveHost::Observer,
const ActiveHost::ActiveHostChangeInfo& change_info) override;
// KeepAliveOperation::Observer:
- void OnOperationFinished() override;
+ void OnOperationFinished(
+ const cryptauth::RemoteDevice& remote_device,
+ std::unique_ptr<DeviceStatus> device_status) override;
private:
friend class KeepAliveSchedulerTest;
- KeepAliveScheduler(ActiveHost* active_host,
- BleConnectionManager* connection_manager,
- std::unique_ptr<base::Timer> timer);
+ KeepAliveScheduler(
+ ActiveHost* active_host,
+ BleConnectionManager* connection_manager,
+ HostScanCache* host_scan_cache,
+ DeviceIdTetherNetworkGuidMap* device_id_tether_network_guid_map,
+ std::unique_ptr<base::Timer> timer);
void SendKeepAliveTickle();
@@ -48,6 +60,8 @@ class KeepAliveScheduler : public ActiveHost::Observer,
ActiveHost* active_host_;
BleConnectionManager* connection_manager_;
+ HostScanCache* host_scan_cache_;
+ DeviceIdTetherNetworkGuidMap* device_id_tether_network_guid_map_;
std::unique_ptr<base::Timer> timer_;
std::shared_ptr<cryptauth::RemoteDevice> active_host_device_;
« no previous file with comments | « chromeos/components/tether/keep_alive_operation_unittest.cc ('k') | chromeos/components/tether/keep_alive_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698