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

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

Issue 2587783003: [CrOS Tether] Fix miscellaneous issues with HostScanScheduler. (Closed)
Patch Set: hansberry@ 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 | « no previous file | chromeos/components/tether/host_scan_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/components/tether/host_scan_scheduler.h
diff --git a/chromeos/components/tether/host_scan_scheduler.h b/chromeos/components/tether/host_scan_scheduler.h
index c68d8b7fe6981bf70f317a3d1e0b93b2cec8c706..80d1aa2375a57f102fbe202129535bf1409aec0d 100644
--- a/chromeos/components/tether/host_scan_scheduler.h
+++ b/chromeos/components/tether/host_scan_scheduler.h
@@ -30,9 +30,8 @@ class HostScanner;
// Schedules scans for tether hosts. To start a scan attempt, three conditions
// must be true:
//
-// (1) The user has just started using the device; specifically, the user has
-// just logged in or has just resumed using the device after it had been
-// sleeping/suspended.
+// (1) The user has just logged in or has just resumed using the device after
+// it had been sleeping/suspended.
// (2) The device does not have an Internet connection.
// (3) The device has synced data about other devices belonging to the user's
// account, and at least one of those devices is capable of being a tether
@@ -75,7 +74,7 @@ class HostScanScheduler : public LoginState::Observer,
private:
friend class HostScanSchedulerTest;
- class Context {
+ class Delegate {
public:
virtual void AddObserver(HostScanScheduler* host_scan_scheduler) = 0;
virtual void RemoveObserver(HostScanScheduler* host_scan_scheduler) = 0;
@@ -84,9 +83,9 @@ class HostScanScheduler : public LoginState::Observer,
virtual bool AreTetherHostsSynced() const = 0;
};
- class ContextImpl : public Context {
+ class DelegateImpl : public Delegate {
public:
- ContextImpl(const content::BrowserContext* browser_context);
+ DelegateImpl(const content::BrowserContext* browser_context);
void AddObserver(HostScanScheduler* host_scan_scheduler) override;
void RemoveObserver(HostScanScheduler* host_scan_scheduler) override;
@@ -95,10 +94,10 @@ class HostScanScheduler : public LoginState::Observer,
bool AreTetherHostsSynced() const override;
};
- HostScanScheduler(std::unique_ptr<Context> context_,
+ HostScanScheduler(std::unique_ptr<Delegate> delegate,
std::unique_ptr<HostScanner> host_scanner);
- std::unique_ptr<Context> context_;
+ std::unique_ptr<Delegate> delegate_;
std::unique_ptr<HostScanner> host_scanner_;
bool initialized_;
« no previous file with comments | « no previous file | chromeos/components/tether/host_scan_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698