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_GCM_MANAGER_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_H |
6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_H | 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_H |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 class PrefRegistrySimple; | 10 class PrefRegistrySimple; |
11 | 11 |
12 namespace proximity_auth { | 12 namespace cryptauth { |
13 | 13 |
14 // Interface for the manager controlling GCM registrations and handling GCM push | 14 // Interface for the manager controlling GCM registrations and handling GCM push |
15 // messages for CryptAuth. CryptAuth sends GCM messages to request the local | 15 // messages for CryptAuth. CryptAuth sends GCM messages to request the local |
16 // device to re-enroll to get the freshest device state, and to notify the | 16 // device to re-enroll to get the freshest device state, and to notify the |
17 // local device to resync the remote device list when this list changes. | 17 // local device to resync the remote device list when this list changes. |
18 class CryptAuthGCMManager { | 18 class CryptAuthGCMManager { |
19 public: | 19 public: |
20 class Observer { | 20 class Observer { |
21 public: | 21 public: |
22 virtual ~Observer(); | 22 virtual ~Observer(); |
(...skipping 29 matching lines...) Expand all Loading... |
52 // will be returned. | 52 // will be returned. |
53 virtual std::string GetRegistrationId() = 0; | 53 virtual std::string GetRegistrationId() = 0; |
54 | 54 |
55 // Adds an observer. | 55 // Adds an observer. |
56 virtual void AddObserver(Observer* observer) = 0; | 56 virtual void AddObserver(Observer* observer) = 0; |
57 | 57 |
58 // Removes an observer. | 58 // Removes an observer. |
59 virtual void RemoveObserver(Observer* observer) = 0; | 59 virtual void RemoveObserver(Observer* observer) = 0; |
60 }; | 60 }; |
61 | 61 |
62 } // namespace proximity_auth | 62 } // namespace cryptauth |
63 | 63 |
64 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_H | 64 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_H |
OLD | NEW |