Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: blimp/net/helium/helium_result.cc

Issue 2385913002: Define canonical enum for "HeliumResult" status values. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium 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 "blimp/net/helium/helium_result.h"
6
7 namespace blimp {
8
9 const char* HeliumResultToString(HeliumResult result) {
10 switch (result) {
11 case HeliumResult::OK:
12 return "OK";
13 break;
14 #define HELIUM_ERROR(label, value) \
15 case HeliumResult::ERR_##label: \
16 return "ERR_" #label;
17 break;
18 #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
19 #undef HELIUM_ERROR
20 }
21 }
22
23 } // namespace blimp
24
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698