Index: components/gcm_driver/gcm_internals_helper.cc |
diff --git a/components/gcm_driver/gcm_internals_helper.cc b/components/gcm_driver/gcm_internals_helper.cc |
index c66d3d7e7d7c6d83b35ed3e6aaedac73570fbe3c..a3417e74467cacc124299124a3249ca1f80215e5 100644 |
--- a/components/gcm_driver/gcm_internals_helper.cc |
+++ b/components/gcm_driver/gcm_internals_helper.cc |
@@ -86,6 +86,19 @@ void SetSendingInfo(const std::vector<gcm::SendingActivity>& sends, |
} |
} |
+void SetDecryptionFailureInfo( |
+ const std::vector<gcm::DecryptionFailureActivity>& failures, |
+ base::ListValue* failure_info) { |
+ for (const gcm::DecryptionFailureActivity& failure : failures) { |
+ base::ListValue* row = new base::ListValue(); |
+ failure_info->Append(row); |
+ |
+ row->AppendDouble(failure.time.ToJsTime()); |
+ row->AppendString(failure.app_id); |
+ row->AppendString(failure.details); |
+ } |
+} |
+ |
} // namespace |
void SetGCMInternalsInfo(const gcm::GCMClient::GCMStatistics* stats, |
@@ -144,6 +157,14 @@ void SetGCMInternalsInfo(const gcm::GCMClient::GCMStatistics* stats, |
results->Set(kSendInfo, send_info); |
SetSendingInfo(stats->recorded_activities.sending_activities, send_info); |
} |
+ |
+ if (stats->recorded_activities.decryption_failure_activities.size() > 0) { |
+ base::ListValue* failure_info = new base::ListValue(); |
+ results->Set(kDecryptionFailureInfo, failure_info); |
+ SetDecryptionFailureInfo( |
+ stats->recorded_activities.decryption_failure_activities, |
+ failure_info); |
+ } |
} |
} |