Christopher Wiley | 2f77293 | 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"; |
| 21 | } |
| 22 | return "unknown"; |
| 23 | } |
| 24 | |
| 25 | } // namespace buffet |