OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/public/common/push_messaging_status.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace content { |
| 10 |
| 11 const char* PushMessagingStatusToString(PushMessagingStatus status) { |
| 12 switch (status) { |
| 13 case PUSH_MESSAGING_STATUS_OK: |
| 14 return "Successful operation"; |
| 15 case PUSH_MESSAGING_STATUS_INVALID_PARAMETER: |
| 16 return "Invalid parameter"; |
| 17 case PUSH_MESSAGING_STATUS_NOT_SIGNED_IN: |
| 18 return "Profile not signed in"; |
| 19 case PUSH_MESSAGING_STATUS_OPERATION_PENDING: |
| 20 return "Previous asynchronous operation is still pending"; |
| 21 case PUSH_MESSAGING_STATUS_NETWORK_ERROR: |
| 22 return "Network socket error"; |
| 23 case PUSH_MESSAGING_STATUS_SERVER_ERROR: |
| 24 return "Server error"; |
| 25 case PUSH_MESSAGING_STATUS_TTL_EXCEEDED: |
| 26 return "Exceeded the specified TTL during message sending"; |
| 27 case PUSH_MESSAGING_STATUS_UNKNOWN_ERROR: |
| 28 return "Unknown error"; |
| 29 } |
| 30 NOTREACHED(); |
| 31 return ""; |
| 32 } |
| 33 |
| 34 } // namespace content |
OLD | NEW |