| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/gcm_driver/gcm_stats_recorder_impl.h" | 5 #include "components/gcm_driver/gcm_stats_recorder_impl.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 void GCMStatsRecorderImpl::NotifyActivityRecorded() { | 185 void GCMStatsRecorderImpl::NotifyActivityRecorded() { |
| 186 if (delegate_) | 186 if (delegate_) |
| 187 delegate_->OnActivityRecorded(); | 187 delegate_->OnActivityRecorded(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void GCMStatsRecorderImpl::RecordDecryptionFailure( | 190 void GCMStatsRecorderImpl::RecordDecryptionFailure( |
| 191 const std::string& app_id, | 191 const std::string& app_id, |
| 192 GCMEncryptionProvider::DecryptionResult result) { | 192 GCMEncryptionProvider::DecryptionResult result) { |
| 193 DCHECK_NE(result, GCMEncryptionProvider::DECRYPTION_RESULT_UNENCRYPTED); | 193 DCHECK_NE(result, GCMEncryptionProvider::DECRYPTION_RESULT_UNENCRYPTED); |
| 194 DCHECK_NE(result, GCMEncryptionProvider::DECRYPTION_RESULT_DECRYPTED); | 194 DCHECK_NE(result, |
| 195 GCMEncryptionProvider::DECRYPTION_RESULT_DECRYPTED_DRAFT_03); |
| 196 DCHECK_NE(result, |
| 197 GCMEncryptionProvider::DECRYPTION_RESULT_DECRYPTED_DRAFT_08); |
| 195 if (!is_recording_) | 198 if (!is_recording_) |
| 196 return; | 199 return; |
| 197 | 200 |
| 198 DecryptionFailureActivity data; | 201 DecryptionFailureActivity data; |
| 199 DecryptionFailureActivity* inserted_data = InsertCircularBuffer( | 202 DecryptionFailureActivity* inserted_data = InsertCircularBuffer( |
| 200 &decryption_failure_activities_, data); | 203 &decryption_failure_activities_, data); |
| 201 inserted_data->app_id = app_id; | 204 inserted_data->app_id = app_id; |
| 202 inserted_data->details = | 205 inserted_data->details = |
| 203 GCMEncryptionProvider::ToDecryptionResultDetailsString(result); | 206 GCMEncryptionProvider::ToDecryptionResultDetailsString(result); |
| 204 | 207 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 const std::string& receiver_id, | 551 const std::string& receiver_id, |
| 549 const std::string& message_id) { | 552 const std::string& message_id) { |
| 550 UMA_HISTOGRAM_COUNTS("GCM.IncomingSendErrors", 1); | 553 UMA_HISTOGRAM_COUNTS("GCM.IncomingSendErrors", 1); |
| 551 if (!is_recording_) | 554 if (!is_recording_) |
| 552 return; | 555 return; |
| 553 RecordSending(app_id, receiver_id, message_id, "Received 'send error' msg", | 556 RecordSending(app_id, receiver_id, message_id, "Received 'send error' msg", |
| 554 std::string()); | 557 std::string()); |
| 555 } | 558 } |
| 556 | 559 |
| 557 } // namespace gcm | 560 } // namespace gcm |
| OLD | NEW |