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

Unified Diff: components/gcm_driver/gcm_stats_recorder_android.h

Issue 1616113003: List message decryption failures on chrome://gcm-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after CL 1619053003 Created 4 years, 11 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/gcm_internals_helper.cc ('k') | components/gcm_driver/gcm_stats_recorder_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_stats_recorder_android.h
diff --git a/components/gcm_driver/gcm_stats_recorder_android.h b/components/gcm_driver/gcm_stats_recorder_android.h
index dbcdc2dff9f7e4b457ef2c8e1571d5b96b418e4d..ea339aae3ea647b01ab594964b7c62afff30afce 100644
--- a/components/gcm_driver/gcm_stats_recorder_android.h
+++ b/components/gcm_driver/gcm_stats_recorder_android.h
@@ -9,15 +9,17 @@
#include <string>
#include "base/macros.h"
+#include "components/gcm_driver/crypto/gcm_encryption_provider.h"
#include "components/gcm_driver/gcm_activity.h"
namespace gcm {
-struct RecordedActivities;
-
// Stats recorder for Android, used for recording stats and activities on the
// GCM Driver level for debugging purposes. Based on the GCMStatsRecorder, as
// defined in the GCM Engine, which does not exist on Android.
+//
+// Note that this class, different from the GCMStatsRecorder(Impl), is expected
+// to be used on the UI thread.
class GCMStatsRecorderAndroid {
public:
// A delegate interface that allows the GCMStatsRecorderAndroid instance to
@@ -57,6 +59,10 @@ class GCMStatsRecorderAndroid {
void RecordDataMessageReceived(const std::string& app_id,
int message_byte_size);
+ // Records a message decryption failure caused by |reason| for |app_id|.
+ void RecordDecryptionFailure(const std::string& app_id,
+ GCMEncryptionProvider::DecryptionFailure reason);
+
bool is_recording() const { return is_recording_; }
void set_is_recording(bool recording) { is_recording_ = recording; }
@@ -77,6 +83,9 @@ class GCMStatsRecorderAndroid {
// Recorded received message activities.
std::deque<ReceivingActivity> receiving_activities_;
+ // Recorded message decryption failure activities.
+ std::deque<DecryptionFailureActivity> decryption_failure_activities_;
+
DISALLOW_COPY_AND_ASSIGN(GCMStatsRecorderAndroid);
};
« no previous file with comments | « components/gcm_driver/gcm_internals_helper.cc ('k') | components/gcm_driver/gcm_stats_recorder_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698