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

Unified Diff: components/gcm_driver/gcm_stats_recorder_impl.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
Index: components/gcm_driver/gcm_stats_recorder_impl.h
diff --git a/components/gcm_driver/gcm_stats_recorder_impl.h b/components/gcm_driver/gcm_stats_recorder_impl.h
index f92be116002885383dbf7fc09f619930df0f80cd..5cbf63abc3e14090f37f32c5a2f5409d6e5b0f09 100644
--- a/components/gcm_driver/gcm_stats_recorder_impl.h
+++ b/components/gcm_driver/gcm_stats_recorder_impl.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/time/time.h"
+#include "components/gcm_driver/crypto/gcm_encryption_provider.h"
#include "components/gcm_driver/gcm_activity.h"
#include "google_apis/gcm/engine/connection_factory.h"
#include "google_apis/gcm/engine/mcs_client.h"
@@ -38,6 +39,10 @@ class GCMStatsRecorderImpl : public GCMStatsRecorder {
// Clear all recorded activities.
void Clear();
+ // Records a message decryption failure caused by |reason| for |app_id|.
+ void RecordDecryptionFailure(const std::string& app_id,
+ GCMEncryptionProvider::DecryptionFailure reason);
+
// GCMStatsRecorder implementation:
void RecordCheckinInitiated(uint64_t android_id) override;
void RecordCheckinDelayedDueToBackoff(int64_t delay_msec) override;
@@ -109,6 +114,10 @@ class GCMStatsRecorderImpl : public GCMStatsRecorder {
const std::deque<SendingActivity>& sending_activities() const {
return sending_activities_;
}
+ const std::deque<DecryptionFailureActivity>& decryption_failure_activities()
+ const {
+ return decryption_failure_activities_;
+ }
protected:
// Notify the recorder delegate, if it exists, that an activity has been
@@ -146,6 +155,7 @@ class GCMStatsRecorderImpl : public GCMStatsRecorder {
std::deque<RegistrationActivity> registration_activities_;
std::deque<ReceivingActivity> receiving_activities_;
std::deque<SendingActivity> sending_activities_;
+ std::deque<DecryptionFailureActivity> decryption_failure_activities_;
base::TimeTicks last_connection_initiation_time_;
base::TimeTicks last_connection_success_time_;
« no previous file with comments | « components/gcm_driver/gcm_stats_recorder_android_unittest.cc ('k') | components/gcm_driver/gcm_stats_recorder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698