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

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

Issue 14655009: Client changes for disabled dasher account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment Created 7 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 | « sync/protocol/sync_enums.proto ('k') | sync/protocol/sync_protocol_error.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ 4 #ifndef SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
5 #define SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ 5 #define SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "sync/base/sync_export.h" 10 #include "sync/base/sync_export.h"
(...skipping 21 matching lines...) Expand all
32 // been taken. 32 // been taken.
33 NON_RETRIABLE_ERROR, 33 NON_RETRIABLE_ERROR,
34 34
35 // Indicates the datatypes have been migrated and the client should resync 35 // Indicates the datatypes have been migrated and the client should resync
36 // them to get the latest progress markers. 36 // them to get the latest progress markers.
37 MIGRATION_DONE, 37 MIGRATION_DONE,
38 38
39 // Invalid Credential. 39 // Invalid Credential.
40 INVALID_CREDENTIAL, 40 INVALID_CREDENTIAL,
41 41
42 // An administrator disabled sync for this domain.
43 DISABLED_BY_ADMIN,
44
42 // The default value. 45 // The default value.
43 UNKNOWN_ERROR 46 UNKNOWN_ERROR
44 }; 47 };
45 48
46 enum ClientAction { 49 enum ClientAction {
47 // Upgrade the client to latest version. 50 // Upgrade the client to latest version.
48 UPGRADE_CLIENT, 51 UPGRADE_CLIENT,
49 52
50 // Clear user data and setup sync again. 53 // Clear user data and setup sync again.
51 CLEAR_USER_DATA_AND_RESYNC, 54 CLEAR_USER_DATA_AND_RESYNC,
52 55
53 // Set the bit on the account to enable sync. 56 // Set the bit on the account to enable sync.
54 ENABLE_SYNC_ON_ACCOUNT, 57 ENABLE_SYNC_ON_ACCOUNT,
55 58
56 // Stop sync and restart sync. 59 // Stop sync and restart sync.
57 STOP_AND_RESTART_SYNC, 60 STOP_AND_RESTART_SYNC,
58 61
59 // Wipe this client of any sync data. 62 // Wipe this client of any sync data.
60 DISABLE_SYNC_ON_CLIENT, 63 DISABLE_SYNC_ON_CLIENT,
61 64
65 // Account is disabled by admin. Stop sync, clear prefs and show message on
66 // settings page that account is disabled.
67 STOP_SYNC_FOR_DISABLED_ACCOUNT,
68
62 // The default. No action. 69 // The default. No action.
63 UNKNOWN_ACTION 70 UNKNOWN_ACTION
64 }; 71 };
65 72
66 struct SYNC_EXPORT SyncProtocolError { 73 struct SYNC_EXPORT SyncProtocolError {
67 SyncProtocolErrorType error_type; 74 SyncProtocolErrorType error_type;
68 std::string error_description; 75 std::string error_description;
69 std::string url; 76 std::string url;
70 ClientAction action; 77 ClientAction action;
71 ModelTypeSet error_data_types; 78 ModelTypeSet error_data_types;
72 SyncProtocolError(); 79 SyncProtocolError();
73 ~SyncProtocolError(); 80 ~SyncProtocolError();
74 DictionaryValue* ToValue() const; 81 DictionaryValue* ToValue() const;
75 }; 82 };
76 83
77 SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type); 84 SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type);
78 SYNC_EXPORT const char* GetClientActionString(ClientAction action); 85 SYNC_EXPORT const char* GetClientActionString(ClientAction action);
79 } // namespace syncer 86 } // namespace syncer
80 #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ 87 #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
81 88
OLDNEW
« no previous file with comments | « sync/protocol/sync_enums.proto ('k') | sync/protocol/sync_protocol_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698