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

Unified Diff: chrome/browser/push_messaging/push_messaging_app_identifier.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
Index: chrome/browser/push_messaging/push_messaging_app_identifier.cc
diff --git a/chrome/browser/push_messaging/push_messaging_app_identifier.cc b/chrome/browser/push_messaging/push_messaging_app_identifier.cc
index 75bed68045171e58f2350bfebeacbcf660f1c85a..fc2f52a0b67c7e18970365411e5bfa1d14be4990 100644
--- a/chrome/browser/push_messaging/push_messaging_app_identifier.cc
+++ b/chrome/browser/push_messaging/push_messaging_app_identifier.cc
@@ -160,6 +160,14 @@ std::vector<PushMessagingAppIdentifier> PushMessagingAppIdentifier::GetAll(
}
// static
+void PushMessagingAppIdentifier::DeleteAllFromPrefs(Profile* profile) {
+ DictionaryPrefUpdate update(profile->GetPrefs(),
+ prefs::kPushMessagingAppIdentifierMap);
+ base::DictionaryValue* map = update.Get();
+ map->Clear();
+}
+
+// static
size_t PushMessagingAppIdentifier::GetCount(Profile* profile) {
return profile->GetPrefs()
->GetDictionary(prefs::kPushMessagingAppIdentifierMap)

Powered by Google App Engine
This is Rietveld 408576698