Christopher Wiley | c900e48 | 2015-02-15 15:42:04 -0800 | [diff] [blame] | 1 | // Copyright 2015 The Chromium OS 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 "buffet/registration_status.h" |
| 6 | |
| 7 | namespace buffet { |
| 8 | |
| 9 | std::string StatusToString(RegistrationStatus status) { |
| 10 | switch (status) { |
| 11 | case RegistrationStatus::kOffline: |
| 12 | return "offline"; |
| 13 | case RegistrationStatus::kCloudError: |
| 14 | return "cloud_error"; |
| 15 | case RegistrationStatus::kUnregistered: |
| 16 | return "unregistered"; |
| 17 | case RegistrationStatus::kRegistering: |
| 18 | return "registering"; |
| 19 | case RegistrationStatus::kRegistered: |
| 20 | return "registered"; |
Nathan Bullock | 24d189f | 2015-02-26 13:09:18 -0500 | [diff] [blame] | 21 | case RegistrationStatus::kInvalidCredentials: |
| 22 | return "invalid_credentials"; |
Christopher Wiley | c900e48 | 2015-02-15 15:42:04 -0800 | [diff] [blame] | 23 | } |
| 24 | return "unknown"; |
| 25 | } |
| 26 | |
| 27 | } // namespace buffet |