OLD | NEW |
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_ENROLLMENT_MANAGER_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H |
6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H | 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "components/proximity_auth/cryptauth/cryptauth_gcm_manager.h" | 14 #include "components/cryptauth/cryptauth_gcm_manager.h" |
15 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" | 15 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
16 #include "components/proximity_auth/cryptauth/sync_scheduler.h" | 16 #include "components/cryptauth/sync_scheduler.h" |
17 | 17 |
18 class PrefRegistrySimple; | 18 class PrefRegistrySimple; |
19 class PrefService; | 19 class PrefService; |
20 | 20 |
21 namespace base { | 21 namespace base { |
22 class Clock; | 22 class Clock; |
23 class Time; | 23 class Time; |
24 } | 24 } |
25 | 25 |
26 namespace proximity_auth { | 26 namespace cryptauth { |
27 | 27 |
28 class CryptAuthEnroller; | 28 class CryptAuthEnroller; |
29 class CryptAuthEnrollerFactory; | 29 class CryptAuthEnrollerFactory; |
30 class SecureMessageDelegate; | 30 class SecureMessageDelegate; |
31 | 31 |
32 // This class manages the device's enrollment with CryptAuth, periodically | 32 // This class manages the device's enrollment with CryptAuth, periodically |
33 // re-enrolling to keep the state on the server fresh. If an enrollment fails, | 33 // re-enrolling to keep the state on the server fresh. If an enrollment fails, |
34 // the manager will schedule the next enrollment more aggressively to recover | 34 // the manager will schedule the next enrollment more aggressively to recover |
35 // from the failure. | 35 // from the failure. |
36 class CryptAuthEnrollmentManager : public SyncScheduler::Delegate, | 36 class CryptAuthEnrollmentManager : public SyncScheduler::Delegate, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 std::unique_ptr<CryptAuthEnroller> cryptauth_enroller_; | 177 std::unique_ptr<CryptAuthEnroller> cryptauth_enroller_; |
178 | 178 |
179 // List of observers. | 179 // List of observers. |
180 base::ObserverList<Observer> observers_; | 180 base::ObserverList<Observer> observers_; |
181 | 181 |
182 base::WeakPtrFactory<CryptAuthEnrollmentManager> weak_ptr_factory_; | 182 base::WeakPtrFactory<CryptAuthEnrollmentManager> weak_ptr_factory_; |
183 | 183 |
184 DISALLOW_COPY_AND_ASSIGN(CryptAuthEnrollmentManager); | 184 DISALLOW_COPY_AND_ASSIGN(CryptAuthEnrollmentManager); |
185 }; | 185 }; |
186 | 186 |
187 } // namespace proximity_auth | 187 } // namespace cryptauth |
188 | 188 |
189 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H | 189 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H |
OLD | NEW |