Chromium Code Reviews| Index: blimp/net/helium/helium_result.cc |
| diff --git a/blimp/net/helium/helium_result.cc b/blimp/net/helium/helium_result.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4e8be4873cf51677d76f604e8c3141e949571d02 |
| --- /dev/null |
| +++ b/blimp/net/helium/helium_result.cc |
| @@ -0,0 +1,24 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "blimp/net/helium/helium_result.h" |
| + |
| +namespace blimp { |
| + |
| +const char* HeliumResultToString(HeliumResult result) { |
| + switch (result) { |
| + case HeliumResult::OK: |
| + return "OK"; |
| + break; |
| +#define HELIUM_ERROR(label, value) \ |
| + case HeliumResult::ERR_##label: \ |
| + return "ERR_" #label; |
| + break; |
| +#include "blimp/net/helium/helium_errors.h" |
|
CJ
2016/10/03 20:47:33
Just for my own knowledge, why does the include co
Kevin M
2016/10/03 22:32:19
This is an unconventional use of preprocessor incl
CJ
2016/10/03 22:36:31
I get that a switch statement is being created, I
|
| +#undef HELIUM_ERROR |
| + } |
| +} |
| + |
| +} // namespace blimp |
| + |