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

Unified Diff: blimp/net/helium/helium_result.cc

Issue 2385913002: Define canonical enum for "HeliumResult" status values. (Closed)
Patch Set: the android compiler is dumb 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 side-by-side diff with in-line comments
Download patch
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..55074ae7eaf9976df73a660d8e7f7f09447d82cf
--- /dev/null
+++ b/blimp/net/helium/helium_result.cc
@@ -0,0 +1,28 @@
+// 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"
+
+#include "base/logging.h"
+
+namespace blimp {
+
+const char* HeliumResultToString(HeliumResult result) {
+ switch (result) {
+ case HeliumResult::SUCCESS:
+ return "SUCCESS";
+ break;
+#define HELIUM_ERROR(label, value) \
+ case HeliumResult::ERR_##label: \
+ return "ERR_" #label;
+ break;
Wez 2016/10/08 00:44:53 This break looks mis-placed, or unnecessary?
+#include "blimp/net/helium/helium_errors.h"
+#undef HELIUM_ERROR
+ }
+
+ NOTREACHED();
+ return "";
+}
+
+} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698