OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_MESSAGE_STATUS_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_MESSAGE_STATUS_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 |
| 10 namespace gcm { |
| 11 |
| 12 // Enumeration to be used for describing the status of a GCM message. |
| 13 enum class GCMMessageStatus { |
| 14 // 0 reserved for unresolved. |
| 15 GCM_UNRESOLVED = 0, |
| 16 // 1 reserved for success. |
| 17 GCM_SUCCESS = 1, |
| 18 |
| 19 // 2 - 99 reserved for the GCM communication error types. |
| 20 GCM_INVALID_SUBTYPE = 2, |
| 21 GCM_INVALID_SENDER_ID = 3, |
| 22 GCM_NO_REGISTRATION = 4, |
| 23 GCM_DECRYPTION_FAILURE = 5, |
| 24 GCM_UNKNOWN_MESSAGE_TYPE = 6, |
| 25 GCM_INVALID_APP_HANDLER = 7, |
| 26 }; |
| 27 |
| 28 using MessageReceiptCallback = base::Callback<void(GCMMessageStatus)>; |
| 29 |
| 30 } // namespace gcm |
| 31 |
| 32 #endif // COMPONENTS_GCM_DRIVER_GCM_MESSAGE_STATUS_H_ |
OLD | NEW |