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

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

Issue 2473813002: Notify GCMAppHandlers when the store is reset, so they clear cached IDs (Closed)
Patch Set: Update Cryptauth comment Created 4 years, 1 month 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 28 matching lines...) Expand all
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;
45 45
46 private: 46 private:
47 // GCMAppHandler: 47 // GCMAppHandler:
48 void ShutdownHandler() override; 48 void ShutdownHandler() override;
49 void OnStoreReset() override;
49 void OnMessage(const std::string& app_id, 50 void OnMessage(const std::string& app_id,
50 const gcm::IncomingMessage& message) override; 51 const gcm::IncomingMessage& message) override;
51 void OnMessagesDeleted(const std::string& app_id) override; 52 void OnMessagesDeleted(const std::string& app_id) override;
52 void OnSendError(const std::string& app_id, 53 void OnSendError(const std::string& app_id,
53 const gcm::GCMClient::SendErrorDetails& details) override; 54 const gcm::GCMClient::SendErrorDetails& details) override;
54 void OnSendAcknowledged(const std::string& app_id, 55 void OnSendAcknowledged(const std::string& app_id,
55 const std::string& message_id) override; 56 const std::string& message_id) override;
56 57
57 // Called when GCM registration completes. 58 // Called when GCM registration completes.
58 void OnRegistrationCompleted(const std::string& registration_id, 59 void OnRegistrationCompleted(const std::string& registration_id,
(...skipping 12 matching lines...) Expand all
71 base::ObserverList<Observer> observers_; 72 base::ObserverList<Observer> observers_;
72 73
73 base::WeakPtrFactory<CryptAuthGCMManagerImpl> weak_ptr_factory_; 74 base::WeakPtrFactory<CryptAuthGCMManagerImpl> weak_ptr_factory_;
74 75
75 DISALLOW_COPY_AND_ASSIGN(CryptAuthGCMManagerImpl); 76 DISALLOW_COPY_AND_ASSIGN(CryptAuthGCMManagerImpl);
76 }; 77 };
77 78
78 } // namespace proximity_auth 79 } // namespace proximity_auth
79 80
80 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H 81 #endif // COMPONENTS_PROXIMITY_CRYPTAUTH_CRYPTAUTH_GCM_MANAGER_IMPL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698