Chromium Code Reviews| Index: content/public/common/push_messaging_status.h |
| diff --git a/content/public/common/push_messaging_status.h b/content/public/common/push_messaging_status.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ad37a764b4aca33c69a39900630abfa5696b0577 |
| --- /dev/null |
| +++ b/content/public/common/push_messaging_status.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_PUSH_MESSAGING_STATUS_H_ |
| +#define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_PUSH_MESSAGING_STATUS_H_ |
| + |
| +namespace content { |
| + |
| +// Generic push messaging operation statuses. |
|
Peter Beverloo
2014/04/01 14:53:18
nit: This comment doesn't add a lot of value.
Michael van Ouwerkerk
2014/04/02 14:25:15
Done.
|
| +enum PushMessagingStatus { |
| + // Operation succeeded. |
| + PUSH_MESSAGING_STATUS_OK, |
| + // Invalid parameter. |
| + PUSH_MESSAGING_STATUS_INVALID_PARAMETER, |
| + // Profile not signed in. |
|
Peter Beverloo
2014/04/01 14:53:18
Can you add a TODO for removing this value once we
Michael van Ouwerkerk
2014/04/02 14:25:15
Done.
|
| + PUSH_MESSAGING_STATUS_NOT_SIGNED_IN, |
| + // Previous asynchronous operation is still pending. Certain operations, like |
| + // register, are only allowed one at a time. |
| + PUSH_MESSAGING_STATUS_OPERATION_PENDING, |
| + // Network socket error. |
| + PUSH_MESSAGING_STATUS_NETWORK_ERROR, |
| + // Problem at the server. |
| + PUSH_MESSAGING_STATUS_SERVER_ERROR, |
| + // Exceeded the specified TTL during message sending. |
| + PUSH_MESSAGING_STATUS_TTL_EXCEEDED, |
| + // Other errors. |
| + PUSH_MESSAGING_STATUS_UNKNOWN_ERROR, |
| +}; |
| + |
| +const char* PushMessagingStatusToString(PushMessagingStatus status); |
|
Peter Beverloo
2014/04/01 14:53:18
Do you expect this will be used outside of push_me
Michael van Ouwerkerk
2014/04/02 14:25:15
Done.
|
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_PUSH_MESSAGING_STATUS_H_ |