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_SYNC_SCHEDULER_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_SYNC_SCHEDULER_H |
6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_SYNC_SCHEDULER_H | 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_SYNC_SCHEDULER_H |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
9 #include "base/time/time.h" | 10 #include "base/time/time.h" |
10 | 11 |
11 namespace proximity_auth { | 12 namespace proximity_auth { |
12 | 13 |
13 // Interface for scheduling the next CryptAuth sync (e.g. enrollment or device | 14 // Interface for scheduling the next CryptAuth sync (e.g. enrollment or device |
14 // sync). The scheduler has two different strategies affecting when to perform | 15 // sync). The scheduler has two different strategies affecting when to perform |
15 // the next operation: | 16 // the next operation: |
16 // PERIODIC_REFRESH: The last sync was made successfully, so we can wait a | 17 // PERIODIC_REFRESH: The last sync was made successfully, so we can wait a |
17 // relatively long time before making another sync. | 18 // relatively long time before making another sync. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 virtual SyncState GetSyncState() const = 0; | 87 virtual SyncState GetSyncState() const = 0; |
87 | 88 |
88 protected: | 89 protected: |
89 // Called by SyncRequest instances when the sync completes. | 90 // Called by SyncRequest instances when the sync completes. |
90 virtual void OnSyncCompleted(bool success) = 0; | 91 virtual void OnSyncCompleted(bool success) = 0; |
91 }; | 92 }; |
92 | 93 |
93 } // namespace proximity_auth | 94 } // namespace proximity_auth |
94 | 95 |
95 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_SYNC_SCHEDULER_H | 96 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_SYNC_SCHEDULER_H |
OLD | NEW |