| 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_IMPL_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H |
| 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H | 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "components/cryptauth/cryptauth_gcm_manager.h" |
| 11 #include "components/gcm_driver/common/gcm_messages.h" | 12 #include "components/gcm_driver/common/gcm_messages.h" |
| 12 #include "components/gcm_driver/gcm_app_handler.h" | 13 #include "components/gcm_driver/gcm_app_handler.h" |
| 13 #include "components/gcm_driver/gcm_client.h" | 14 #include "components/gcm_driver/gcm_client.h" |
| 14 #include "components/proximity_auth/cryptauth/cryptauth_gcm_manager.h" | |
| 15 | 15 |
| 16 class PrefService; | 16 class PrefService; |
| 17 | 17 |
| 18 namespace gcm { | 18 namespace gcm { |
| 19 class GCMDriver; | 19 class GCMDriver; |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 namespace proximity_auth { | 22 namespace cryptauth { |
| 23 | 23 |
| 24 // Implementation of CryptAuthGCMManager. | 24 // Implementation of CryptAuthGCMManager. |
| 25 class CryptAuthGCMManagerImpl : public CryptAuthGCMManager, | 25 class CryptAuthGCMManagerImpl : public CryptAuthGCMManager, |
| 26 public gcm::GCMAppHandler { | 26 public gcm::GCMAppHandler { |
| 27 public: | 27 public: |
| 28 // Creates the manager: | 28 // Creates the manager: |
| 29 // |gcm_driver|: Handles the actual GCM communications. The driver is not | 29 // |gcm_driver|: Handles the actual GCM communications. The driver is not |
| 30 // owned and must outlive this instance. | 30 // owned and must outlive this instance. |
| 31 // |pref_service|: Contains preferences across browser restarts, and should | 31 // |pref_service|: Contains preferences across browser restarts, and should |
| 32 // have been registered through RegisterPrefs(). The service is not owned | 32 // have been registered through RegisterPrefs(). The service is not owned |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 bool registration_in_progress_; | 68 bool registration_in_progress_; |
| 69 | 69 |
| 70 // List of observers. | 70 // List of observers. |
| 71 base::ObserverList<Observer> observers_; | 71 base::ObserverList<Observer> observers_; |
| 72 | 72 |
| 73 base::WeakPtrFactory<CryptAuthGCMManagerImpl> weak_ptr_factory_; | 73 base::WeakPtrFactory<CryptAuthGCMManagerImpl> weak_ptr_factory_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(CryptAuthGCMManagerImpl); | 75 DISALLOW_COPY_AND_ASSIGN(CryptAuthGCMManagerImpl); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace proximity_auth | 78 } // namespace cryptauth |
| 79 | 79 |
| 80 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H | 80 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H |
| OLD | NEW |