| Index: content/public/common/push_messaging_status.cc
|
| diff --git a/content/public/common/push_messaging_status.cc b/content/public/common/push_messaging_status.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a3f0855d443a566a242567d688df55b39e274a2c
|
| --- /dev/null
|
| +++ b/content/public/common/push_messaging_status.cc
|
| @@ -0,0 +1,34 @@
|
| +// 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.
|
| +
|
| +#include "content/public/common/push_messaging_status.h"
|
| +
|
| +#include "base/logging.h"
|
| +
|
| +namespace content {
|
| +
|
| +const char* PushMessagingStatusToString(PushMessagingStatus status) {
|
| + switch (status) {
|
| + case PUSH_MESSAGING_STATUS_OK:
|
| + return "Successful operation";
|
| + case PUSH_MESSAGING_STATUS_INVALID_PARAMETER:
|
| + return "Invalid parameter";
|
| + case PUSH_MESSAGING_STATUS_NOT_SIGNED_IN:
|
| + return "Profile not signed in";
|
| + case PUSH_MESSAGING_STATUS_OPERATION_PENDING:
|
| + return "Previous asynchronous operation is still pending";
|
| + case PUSH_MESSAGING_STATUS_NETWORK_ERROR:
|
| + return "Network socket error";
|
| + case PUSH_MESSAGING_STATUS_SERVER_ERROR:
|
| + return "Server error";
|
| + case PUSH_MESSAGING_STATUS_TTL_EXCEEDED:
|
| + return "Exceeded the specified TTL during message sending";
|
| + case PUSH_MESSAGING_STATUS_UNKNOWN_ERROR:
|
| + return "Unknown error";
|
| + }
|
| + NOTREACHED();
|
| + return "";
|
| +}
|
| +
|
| +} // namespace content
|
|
|