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