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

Unified Diff: components/gcm_driver/crypto/gcm_encryption_provider.h

Issue 1953273002: Add support to GCMKeyStore for multiple keys per app_id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid6fixstore
Patch Set: Only EXPECT_DFATAL when LOG_DCHECK == LOG_DFATAL Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/gcm_driver/crypto/BUILD.gn ('k') | components/gcm_driver/crypto/gcm_encryption_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/crypto/gcm_encryption_provider.h
diff --git a/components/gcm_driver/crypto/gcm_encryption_provider.h b/components/gcm_driver/crypto/gcm_encryption_provider.h
index 1b90f87220b57d8592d0447a0831d847c0c95de6..81a96b73c51c9f8d2e67c46603a6527001dca8c2 100644
--- a/components/gcm_driver/crypto/gcm_encryption_provider.h
+++ b/components/gcm_driver/crypto/gcm_encryption_provider.h
@@ -82,13 +82,19 @@ class GCMEncryptionProvider {
const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner);
// Retrieves the public key and authentication secret associated with the
- // |app_id|. If none have been associated yet, they will be created.
+ // |app_id| + |authorized_entity| pair. Will create this info if necessary.
+ // |authorized_entity| should be the InstanceID token's authorized entity, or
+ // "" for non-InstanceID GCM registrations.
void GetEncryptionInfo(const std::string& app_id,
+ const std::string& authorized_entity,
const EncryptionInfoCallback& callback);
- // Removes all encryption information associated with the |app_id|. Will
- // invoke the |callback| when this has finished.
+ // Removes all encryption information associated with the |app_id| +
+ // |authorized_entity| pair, then invokes |callback|. |authorized_entity|
+ // should be the InstanceID token's authorized entity, or "*" to remove for
+ // all InstanceID tokens, or "" for non-InstanceID GCM registrations.
void RemoveEncryptionInfo(const std::string& app_id,
+ const std::string& authorized_entity,
const base::Closure& callback);
// Determines whether |message| contains encrypted content.
@@ -103,9 +109,14 @@ class GCMEncryptionProvider {
const MessageCallback& callback);
private:
- FRIEND_TEST_ALL_PREFIXES(GCMEncryptionProviderTest, EncryptionRoundTrip);
+ friend class GCMEncryptionProviderTest;
+ FRIEND_TEST_ALL_PREFIXES(GCMEncryptionProviderTest,
+ EncryptionRoundTripGCMRegistration);
+ FRIEND_TEST_ALL_PREFIXES(GCMEncryptionProviderTest,
+ EncryptionRoundTripInstanceIDToken);
void DidGetEncryptionInfo(const std::string& app_id,
+ const std::string& authorized_entity,
const EncryptionInfoCallback& callback,
const KeyPair& pair,
const std::string& auth_secret);
« no previous file with comments | « components/gcm_driver/crypto/BUILD.gn ('k') | components/gcm_driver/crypto/gcm_encryption_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698