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

Unified Diff: components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc
diff --git a/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc b/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc
index 77680e8f31f40be707e320f2f0acdb05c644797b..9331e2737d122450efcab5864d84fb7ae3eb7607 100644
--- a/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc
+++ b/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc
@@ -83,6 +83,12 @@ void CryptAuthGCMManagerImpl::RemoveObserver(Observer* observer) {
void CryptAuthGCMManagerImpl::ShutdownHandler() {
}
+void CryptAuthGCMManagerImpl::OnStoreReset() {
+ // We will automatically re-register to GCM and re-enroll the new registration
+ // ID to Cryptauth during the next scheduled sync.
+ pref_service_->ClearPref(prefs::kCryptAuthGCMRegistrationId);
+}
+
void CryptAuthGCMManagerImpl::OnMessage(const std::string& app_id,
const gcm::IncomingMessage& message) {
std::vector<std::string> fields;
« no previous file with comments | « components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698