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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 case gcm::RegistrationRequest::AUTHENTICATION_FAILED: | 95 case gcm::RegistrationRequest::AUTHENTICATION_FAILED: |
96 return "AUTHENTICATION_FAILED"; | 96 return "AUTHENTICATION_FAILED"; |
97 case gcm::RegistrationRequest::DEVICE_REGISTRATION_ERROR: | 97 case gcm::RegistrationRequest::DEVICE_REGISTRATION_ERROR: |
98 return "DEVICE_REGISTRATION_ERROR"; | 98 return "DEVICE_REGISTRATION_ERROR"; |
99 case gcm::RegistrationRequest::UNKNOWN_ERROR: | 99 case gcm::RegistrationRequest::UNKNOWN_ERROR: |
100 return "UNKNOWN_ERROR"; | 100 return "UNKNOWN_ERROR"; |
101 case gcm::RegistrationRequest::URL_FETCHING_FAILED: | 101 case gcm::RegistrationRequest::URL_FETCHING_FAILED: |
102 return "URL_FETCHING_FAILED"; | 102 return "URL_FETCHING_FAILED"; |
103 case gcm::RegistrationRequest::HTTP_NOT_OK: | 103 case gcm::RegistrationRequest::HTTP_NOT_OK: |
104 return "HTTP_NOT_OK"; | 104 return "HTTP_NOT_OK"; |
105 case gcm::RegistrationRequest::RESPONSE_PARSING_FAILED: | 105 case gcm::RegistrationRequest::NO_RESPONSE_BODY: |
106 return "RESPONSE_PARSING_FAILED"; | 106 return "NO_RESPONSE_BODY"; |
107 case gcm::RegistrationRequest::REACHED_MAX_RETRIES: | 107 case gcm::RegistrationRequest::REACHED_MAX_RETRIES: |
108 return "REACHED_MAX_RETRIES"; | 108 return "REACHED_MAX_RETRIES"; |
109 case gcm::RegistrationRequest::STATUS_COUNT: | 109 case gcm::RegistrationRequest::STATUS_COUNT: |
110 NOTREACHED(); | 110 NOTREACHED(); |
111 break; | 111 break; |
112 } | 112 } |
113 return "UNKNOWN_STATUS"; | 113 return "UNKNOWN_STATUS"; |
114 } | 114 } |
115 | 115 |
116 // Helper for getting string representation of the RegistrationRequest::Status | 116 // Helper for getting string representation of the RegistrationRequest::Status |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 const std::string& receiver_id, | 543 const std::string& receiver_id, |
544 const std::string& message_id) { | 544 const std::string& message_id) { |
545 UMA_HISTOGRAM_COUNTS("GCM.IncomingSendErrors", 1); | 545 UMA_HISTOGRAM_COUNTS("GCM.IncomingSendErrors", 1); |
546 if (!is_recording_) | 546 if (!is_recording_) |
547 return; | 547 return; |
548 RecordSending(app_id, receiver_id, message_id, "Received 'send error' msg", | 548 RecordSending(app_id, receiver_id, message_id, "Received 'send error' msg", |
549 std::string()); | 549 std::string()); |
550 } | 550 } |
551 | 551 |
552 } // namespace gcm | 552 } // namespace gcm |
OLD | NEW |