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

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

Issue 238273008: Add an action for server to send down rollback command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Set the bit on the account to enable sync. 56 // Set the bit on the account to enable sync.
57 ENABLE_SYNC_ON_ACCOUNT, 57 ENABLE_SYNC_ON_ACCOUNT,
58 58
59 // Stop sync and restart sync. 59 // Stop sync and restart sync.
60 STOP_AND_RESTART_SYNC, 60 STOP_AND_RESTART_SYNC,
61 61
62 // Wipe this client of any sync data. 62 // Wipe this client of any sync data.
63 DISABLE_SYNC_ON_CLIENT, 63 DISABLE_SYNC_ON_CLIENT,
64 64
65 // Disable sync and roll back local model to pre-sync state.
66 DISABLE_SYNC_AND_ROLLBACK,
67
65 // Account is disabled by admin. Stop sync, clear prefs and show message on 68 // Account is disabled by admin. Stop sync, clear prefs and show message on
66 // settings page that account is disabled. 69 // settings page that account is disabled.
67 STOP_SYNC_FOR_DISABLED_ACCOUNT, 70 STOP_SYNC_FOR_DISABLED_ACCOUNT,
68 71
69 // The default. No action. 72 // The default. No action.
70 UNKNOWN_ACTION 73 UNKNOWN_ACTION
71 }; 74 };
72 75
73 struct SYNC_EXPORT SyncProtocolError { 76 struct SYNC_EXPORT SyncProtocolError {
74 SyncProtocolErrorType error_type; 77 SyncProtocolErrorType error_type;
75 std::string error_description; 78 std::string error_description;
76 std::string url; 79 std::string url;
77 ClientAction action; 80 ClientAction action;
78 ModelTypeSet error_data_types; 81 ModelTypeSet error_data_types;
79 SyncProtocolError(); 82 SyncProtocolError();
80 ~SyncProtocolError(); 83 ~SyncProtocolError();
81 base::DictionaryValue* ToValue() const; 84 base::DictionaryValue* ToValue() const;
82 }; 85 };
83 86
84 SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type); 87 SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type);
85 SYNC_EXPORT const char* GetClientActionString(ClientAction action); 88 SYNC_EXPORT const char* GetClientActionString(ClientAction action);
86 } // namespace syncer 89 } // namespace syncer
87 #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ 90 #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_
88 91
OLDNEW
« sync/protocol/sync_enums.proto ('K') | « sync/protocol/sync_enums.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698