List message decryption failures on chrome://gcm-internals
This CL is basically just plumbing of a result code to an internal
diagnosis page. Decryption is done at the level of the GCM Driver,
while, for desktop, the GCMStatsRecorder is owned by the GCMClient
several layers down, on another thread.
This is a re-land of the following CL, which got reverted due to
flakiness on iOS: https://codereview.chromium.org/1616113003/
The flakiness is addresses by pumping the loops in the order in
which messages are posted to the other threads.
TBR=jianli
BUG=569127
Review URL: https://codereview.chromium.org/1641993004
Cr-Commit-Position: refs/heads/master@{#372644}
diff --git a/components/gcm_driver/gcm_client.h b/components/gcm_driver/gcm_client.h
index fa4175ae6..5a24c4d 100644
--- a/components/gcm_driver/gcm_client.h
+++ b/components/gcm_driver/gcm_client.h
@@ -14,6 +14,7 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "components/gcm_driver/common/gcm_messages.h"
+#include "components/gcm_driver/crypto/gcm_encryption_provider.h"
#include "components/gcm_driver/gcm_activity.h"
#include "components/gcm_driver/registration_info.h"
@@ -268,6 +269,11 @@
const std::string& receiver_id,
const OutgoingMessage& message) = 0;
+ // Records a decryption failure due to |reason| for the |app_id|.
+ virtual void RecordDecryptionFailure(
+ const std::string& app_id,
+ GCMEncryptionProvider::DecryptionFailure reason) = 0;
+
// Enables or disables internal activity recording.
virtual void SetRecording(bool recording) = 0;