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

Unified Diff: components/cryptauth/cryptauth_device_manager.h

Issue 2561683002: Update CryptAuthDeviceManager to store all synced devices instead of only unlock keys. (Closed)
Patch Set: 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
Index: components/cryptauth/cryptauth_device_manager.h
diff --git a/components/cryptauth/cryptauth_device_manager.h b/components/cryptauth/cryptauth_device_manager.h
index 9f3602fd949ade0ee6064b111cfcb8ce6adc9486..5cc2025d7c33f6bde4618e420e76651969c37a7d 100644
--- a/components/cryptauth/cryptauth_device_manager.h
+++ b/components/cryptauth/cryptauth_device_manager.h
@@ -105,11 +105,17 @@ class CryptAuthDeviceManager : public SyncScheduler::Delegate,
// has ever been recorded, then this function will also return true.
bool IsRecoveringFromFailure() const;
- // Returns a list of remote devices that can unlock the user's other devices.
- const std::vector<cryptauth::ExternalDeviceInfo>& unlock_keys() const {
- return unlock_keys_;
+ // Returns a list of all remote devices that have been synced.
+ const std::vector<cryptauth::ExternalDeviceInfo> synced_devices() const {
+ return synced_devices_;
Ryan Hansberry 2016/12/07 23:51:37 Noob question: Why implement this method in the he
Kyle Horimoto 2016/12/08 00:11:13 It's common to trivial getters this way to tell th
}
+ // Returns a list of remote devices that can unlock the user's other devices.
+ const std::vector<cryptauth::ExternalDeviceInfo> unlock_keys() const;
+
+ // Returns a list of remote devices that can host tether hotspots.
+ const std::vector<cryptauth::ExternalDeviceInfo> tether_hosts() const;
+
protected:
// Creates a new SyncScheduler instance. Exposed for testing.
virtual std::unique_ptr<SyncScheduler> CreateSyncScheduler();
@@ -144,8 +150,8 @@ class CryptAuthDeviceManager : public SyncScheduler::Delegate,
// instance.
PrefService* const pref_service_;
- // The unlock keys currently synced from CryptAuth.
- std::vector<cryptauth::ExternalDeviceInfo> unlock_keys_;
+ // All devices currently synced from CryptAuth.
+ std::vector<cryptauth::ExternalDeviceInfo> synced_devices_;
// Schedules the time between device sync attempts.
std::unique_ptr<SyncScheduler> scheduler_;
« no previous file with comments | « no previous file | components/cryptauth/cryptauth_device_manager.cc » ('j') | components/cryptauth/cryptauth_device_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698