blob: 3b44ae3853ca63a0890e01181ec50f9d4c1e5879 [file] [log] [blame]
Christopher Wileyc900e482015-02-15 15:42:04 -08001// 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
7namespace buffet {
8
9std::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 Bullock24d189f2015-02-26 13:09:18 -050021 case RegistrationStatus::kInvalidCredentials:
22 return "invalid_credentials";
Christopher Wileyc900e482015-02-15 15:42:04 -080023 }
24 return "unknown";
25}
26
27} // namespace buffet