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_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 <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/clock.h" | 13 #include "base/time/clock.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "components/proximity_auth/cryptauth/cryptauth_gcm_manager.h" | 15 #include "components/cryptauth/cryptauth_gcm_manager.h" |
16 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" | 16 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
17 #include "components/proximity_auth/cryptauth/sync_scheduler.h" | 17 #include "components/cryptauth/sync_scheduler.h" |
18 | 18 |
19 class PrefService; | 19 class PrefService; |
20 class PrefRegistrySimple; | 20 class PrefRegistrySimple; |
21 | 21 |
22 namespace proximity_auth { | 22 namespace cryptauth { |
23 | 23 |
24 class CryptAuthClient; | 24 class CryptAuthClient; |
25 class CryptAuthClientFactory; | 25 class CryptAuthClientFactory; |
26 | 26 |
27 // This class manages syncing and storing the user's phones that are registered | 27 // This class manages syncing and storing the user's phones that are registered |
28 // with CryptAuth and are capable of unlocking the user's other devices. These | 28 // with CryptAuth and are capable of unlocking the user's other devices. These |
29 // phones are called "unlock keys". | 29 // phones are called "unlock keys". |
30 // The manager periodically syncs the user's devices from CryptAuth to keep the | 30 // The manager periodically syncs the user's devices from CryptAuth to keep the |
31 // list of unlock keys fresh. If a sync attempts fails, the manager will | 31 // list of unlock keys fresh. If a sync attempts fails, the manager will |
32 // schedule the next sync more aggressively to recover. | 32 // schedule the next sync more aggressively to recover. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 std::unique_ptr<CryptAuthClient> cryptauth_client_; | 159 std::unique_ptr<CryptAuthClient> cryptauth_client_; |
160 | 160 |
161 // List of observers. | 161 // List of observers. |
162 base::ObserverList<Observer> observers_; | 162 base::ObserverList<Observer> observers_; |
163 | 163 |
164 base::WeakPtrFactory<CryptAuthDeviceManager> weak_ptr_factory_; | 164 base::WeakPtrFactory<CryptAuthDeviceManager> weak_ptr_factory_; |
165 | 165 |
166 DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceManager); | 166 DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceManager); |
167 }; | 167 }; |
168 | 168 |
169 } // namespace proximity_auth | 169 } // namespace cryptauth |
170 | 170 |
171 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H | 171 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H |
OLD | NEW |