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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_app_identifier.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_APP_IDENTIFIER_H_ 5 #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_APP_IDENTIFIER_H_
6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_APP_IDENTIFIER_H_ 6 #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_APP_IDENTIFIER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <string> 10 #include <string>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // If not found, is_null() will be true. 51 // If not found, is_null() will be true.
52 static PushMessagingAppIdentifier FindByServiceWorker( 52 static PushMessagingAppIdentifier FindByServiceWorker(
53 Profile* profile, 53 Profile* profile,
54 const GURL& origin, 54 const GURL& origin,
55 int64_t service_worker_registration_id); 55 int64_t service_worker_registration_id);
56 56
57 // Returns all the PushMessagingAppIdentifiers currently registered for the 57 // Returns all the PushMessagingAppIdentifiers currently registered for the
58 // given |profile|. 58 // given |profile|.
59 static std::vector<PushMessagingAppIdentifier> GetAll(Profile* profile); 59 static std::vector<PushMessagingAppIdentifier> GetAll(Profile* profile);
60 60
61 // Deletes all PushMessagingAppIdentifiers currently registered for the given
62 // |profile|.
63 static void DeleteAllFromPrefs(Profile* profile);
64
61 // Returns the number of PushMessagingAppIdentifiers currently registered for 65 // Returns the number of PushMessagingAppIdentifiers currently registered for
62 // the given |profile|. 66 // the given |profile|.
63 static size_t GetCount(Profile* profile); 67 static size_t GetCount(Profile* profile);
64 68
65 ~PushMessagingAppIdentifier(); 69 ~PushMessagingAppIdentifier();
66 70
67 // Persist this app identifier to prefs. 71 // Persist this app identifier to prefs.
68 void PersistToPrefs(Profile* profile) const; 72 void PersistToPrefs(Profile* profile) const;
69 73
70 // Delete this app identifier from prefs. 74 // Delete this app identifier from prefs.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 110
107 // Validates that all the fields contain valid values. 111 // Validates that all the fields contain valid values.
108 void DCheckValid() const; 112 void DCheckValid() const;
109 113
110 std::string app_id_; 114 std::string app_id_;
111 GURL origin_; 115 GURL origin_;
112 int64_t service_worker_registration_id_; 116 int64_t service_worker_registration_id_;
113 }; 117 };
114 118
115 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_APP_IDENTIFIER_H_ 119 #endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_APP_IDENTIFIER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_gcm_app_handler.cc ('k') | chrome/browser/push_messaging/push_messaging_app_identifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698