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

Side by Side Diff: sync/protocol/sync_protocol_error.cc

Issue 1500803002: [Sync] Ensure all values of SyncProtocolErrorType are handled in ShouldRequestEarlyExit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows build Created 5 years 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 | « sync/protocol/sync_protocol_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "sync/protocol/sync_protocol_error.h" 5 #include "sync/protocol/sync_protocol_error.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 11
12 namespace syncer { 12 namespace syncer {
13 #define ENUM_CASE(x) case x: return #x; break; 13 #define ENUM_CASE(x) case x: return #x; break;
14 14
15 const char* GetSyncErrorTypeString(SyncProtocolErrorType type) { 15 const char* GetSyncErrorTypeString(SyncProtocolErrorType type) {
16 switch (type) { 16 switch (type) {
17 ENUM_CASE(SYNC_SUCCESS); 17 ENUM_CASE(SYNC_SUCCESS);
18 ENUM_CASE(NOT_MY_BIRTHDAY); 18 ENUM_CASE(NOT_MY_BIRTHDAY);
19 ENUM_CASE(THROTTLED); 19 ENUM_CASE(THROTTLED);
20 ENUM_CASE(CLEAR_PENDING); 20 ENUM_CASE(CLEAR_PENDING);
21 ENUM_CASE(TRANSIENT_ERROR); 21 ENUM_CASE(TRANSIENT_ERROR);
22 ENUM_CASE(NON_RETRIABLE_ERROR);
23 ENUM_CASE(MIGRATION_DONE); 22 ENUM_CASE(MIGRATION_DONE);
24 ENUM_CASE(INVALID_CREDENTIAL); 23 ENUM_CASE(INVALID_CREDENTIAL);
25 ENUM_CASE(DISABLED_BY_ADMIN); 24 ENUM_CASE(DISABLED_BY_ADMIN);
26 ENUM_CASE(USER_ROLLBACK); 25 ENUM_CASE(USER_ROLLBACK);
27 ENUM_CASE(PARTIAL_FAILURE); 26 ENUM_CASE(PARTIAL_FAILURE);
28 ENUM_CASE(CLIENT_DATA_OBSOLETE); 27 ENUM_CASE(CLIENT_DATA_OBSOLETE);
29 ENUM_CASE(UNKNOWN_ERROR); 28 ENUM_CASE(UNKNOWN_ERROR);
30 } 29 }
31 NOTREACHED(); 30 NOTREACHED();
32 return ""; 31 return "";
(...skipping 29 matching lines...) Expand all
62 value->SetString("ErrorType", 61 value->SetString("ErrorType",
63 GetSyncErrorTypeString(error_type)); 62 GetSyncErrorTypeString(error_type));
64 value->SetString("ErrorDescription", error_description); 63 value->SetString("ErrorDescription", error_description);
65 value->SetString("url", url); 64 value->SetString("url", url);
66 value->SetString("action", GetClientActionString(action)); 65 value->SetString("action", GetClientActionString(action));
67 return value; 66 return value;
68 } 67 }
69 68
70 } // namespace syncer 69 } // namespace syncer
71 70
OLDNEW
« no previous file with comments | « sync/protocol/sync_protocol_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698