| 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 "content/public/common/push_messaging_status.h" | 5 #include "content/public/common/push_messaging_status.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 return "Registration failed - could not retrieve the public key"; | 50 return "Registration failed - could not retrieve the public key"; |
| 51 | 51 |
| 52 case PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING: | 52 case PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING: |
| 53 return "Registration failed - missing applicationServerKey, and manifest " | 53 return "Registration failed - missing applicationServerKey, and manifest " |
| 54 "empty or missing"; | 54 "empty or missing"; |
| 55 | 55 |
| 56 case PUSH_REGISTRATION_STATUS_SENDER_ID_MISMATCH: | 56 case PUSH_REGISTRATION_STATUS_SENDER_ID_MISMATCH: |
| 57 return "Registration failed - A subscription with a different " | 57 return "Registration failed - A subscription with a different " |
| 58 "applicationServerKey (or gcm_sender_id) already exists; to " | 58 "applicationServerKey (or gcm_sender_id) already exists; to " |
| 59 "change the applicationServerKey, unsubscribe then resubscribe."; | 59 "change the applicationServerKey, unsubscribe then resubscribe."; |
| 60 |
| 61 case PUSH_REGISTRATION_STATUS_STORAGE_CORRUPT: |
| 62 return "Registration failed - storage corrupt"; |
| 60 } | 63 } |
| 61 NOTREACHED(); | 64 NOTREACHED(); |
| 62 return ""; | 65 return ""; |
| 63 } | 66 } |
| 64 | 67 |
| 65 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status) { | 68 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status) { |
| 66 switch (status) { | 69 switch (status) { |
| 67 case PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED: | 70 case PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED: |
| 68 return "Unregistration successful - from push service"; | 71 return "Unregistration successful - from push service"; |
| 69 | 72 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 88 return "Unregistration failed - storage error"; | 91 return "Unregistration failed - storage error"; |
| 89 | 92 |
| 90 case PUSH_UNREGISTRATION_STATUS_NETWORK_ERROR: | 93 case PUSH_UNREGISTRATION_STATUS_NETWORK_ERROR: |
| 91 return "Unregistration failed - could not connect to push server"; | 94 return "Unregistration failed - could not connect to push server"; |
| 92 } | 95 } |
| 93 NOTREACHED(); | 96 NOTREACHED(); |
| 94 return ""; | 97 return ""; |
| 95 } | 98 } |
| 96 | 99 |
| 97 } // namespace content | 100 } // namespace content |
| OLD | NEW |