Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.h

Issue 1248533003: Hook up CryptAuthGCMManager to the enrollment and device sync managers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix webui Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 13 matching lines...) Expand all
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
33 // and must outlive this instance. 33 // and must outlive this instance.
34 CryptAuthGCMManagerImpl(gcm::GCMDriver* gcm_deriver, 34 CryptAuthGCMManagerImpl(gcm::GCMDriver* gcm_driver,
35 PrefService* pref_service); 35 PrefService* pref_service);
36 36
37 ~CryptAuthGCMManagerImpl() override; 37 ~CryptAuthGCMManagerImpl() override;
38 38
39 // CryptAuthGCMManager: 39 // CryptAuthGCMManager:
40 void StartListening() override; 40 void StartListening() override;
41 void RegisterWithGCM() override; 41 void RegisterWithGCM() override;
42 std::string GetRegistrationId() override; 42 std::string GetRegistrationId() override;
43 void AddObserver(Observer* observer) override; 43 void AddObserver(Observer* observer) override;
44 void RemoveObserver(Observer* observer) override; 44 void RemoveObserver(Observer* observer) override;
(...skipping 26 matching lines...) Expand all
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 proximity_auth
79 79
80 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H 80 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698