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

Side by Side Diff: components/proximity_auth/cryptauth/cryptauth_device_manager.h

Issue 1264703003: Implement debugging local unlock keys in chrome://proximity-auth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + fixes Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H
6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Returns true if a device sync attempt is currently in progress. 98 // Returns true if a device sync attempt is currently in progress.
99 bool IsSyncInProgress() const; 99 bool IsSyncInProgress() const;
100 100
101 // Returns true if the last device sync failed and the manager is now 101 // Returns true if the last device sync failed and the manager is now
102 // scheduling sync attempts more aggressively to recover. If no enrollment 102 // scheduling sync attempts more aggressively to recover. If no enrollment
103 // has ever been recorded, then this function will also return true. 103 // has ever been recorded, then this function will also return true.
104 bool IsRecoveringFromFailure() const; 104 bool IsRecoveringFromFailure() const;
105 105
106 // Returns a list of remote devices that can unlock the user's other devices. 106 // Returns a list of remote devices that can unlock the user's other devices.
107 const std::vector<cryptauth::ExternalDeviceInfo>& unlock_keys() { 107 const std::vector<cryptauth::ExternalDeviceInfo>& unlock_keys() const {
108 return unlock_keys_; 108 return unlock_keys_;
109 } 109 }
110 110
111 protected: 111 protected:
112 // Creates a new SyncScheduler instance. Exposed for testing. 112 // Creates a new SyncScheduler instance. Exposed for testing.
113 virtual scoped_ptr<SyncScheduler> CreateSyncScheduler(); 113 virtual scoped_ptr<SyncScheduler> CreateSyncScheduler();
114 114
115 private: 115 private:
116 // CryptAuthGCMManager::Observer: 116 // CryptAuthGCMManager::Observer:
117 void OnResyncMessage() override; 117 void OnResyncMessage() override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 base::ObserverList<Observer> observers_; 160 base::ObserverList<Observer> observers_;
161 161
162 base::WeakPtrFactory<CryptAuthDeviceManager> weak_ptr_factory_; 162 base::WeakPtrFactory<CryptAuthDeviceManager> weak_ptr_factory_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceManager); 164 DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceManager);
165 }; 165 };
166 166
167 } // namespace proximity_auth 167 } // namespace proximity_auth
168 168
169 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H 169 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H
OLDNEW
« no previous file with comments | « components/proximity_auth/connection.h ('k') | components/proximity_auth/device_to_device_initiator_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698