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

Side by Side Diff: tools/battor_agent/battor_error.cc

Issue 1991403002: [battor agent] Fix the init sequence so it retries inits instead of resets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment Created 4 years, 6 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
« no previous file with comments | « tools/battor_agent/battor_error.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/battor_agent/battor_error.h" 5 #include "tools/battor_agent/battor_error.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace battor { 9 namespace battor {
10 10
11 std::string BattOrErrorToString(BattOrError error) { 11 std::string BattOrErrorToString(BattOrError error) {
12 switch (error) { 12 switch (error) {
13 case BATTOR_ERROR_NONE: 13 case BATTOR_ERROR_NONE:
14 return "NONE"; 14 return "NONE";
15 case BATTOR_ERROR_CONNECTION_FAILED: 15 case BATTOR_ERROR_CONNECTION_FAILED:
16 return "CONNECTION FAILED"; 16 return "CONNECTION FAILED";
17 case BATTOR_ERROR_TIMEOUT: 17 case BATTOR_ERROR_TIMEOUT:
18 return "TIMEOUT"; 18 return "TIMEOUT";
19 case BATTOR_ERROR_SEND_ERROR: 19 case BATTOR_ERROR_SEND_ERROR:
20 return "SEND ERROR"; 20 return "SEND ERROR";
21 case BATTOR_ERROR_RECEIVE_ERROR: 21 case BATTOR_ERROR_RECEIVE_ERROR:
22 return "RECEIVE ERROR"; 22 return "RECEIVE ERROR";
23 case BATTOR_ERROR_UNEXPECTED_MESSAGE: 23 case BATTOR_ERROR_UNEXPECTED_MESSAGE:
24 return "UNEXPECTED MESSAGE"; 24 return "UNEXPECTED MESSAGE";
25 case BATTOR_ERROR_TOO_MANY_INIT_RETRIES:
26 return "TOO MANY INIT RETRIES";
25 } 27 }
26 28
27 NOTREACHED(); 29 NOTREACHED();
28 return std::string(); 30 return std::string();
29 } 31 }
30 32
31 } // namespace battor 33 } // namespace battor
OLDNEW
« no previous file with comments | « tools/battor_agent/battor_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698