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

Side by Side Diff: chrome/browser/sync/sessions/sync_protocol_error.h

Issue 7621085: Server directed error handling backend code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 4 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNC_PROTOCOL_ERROR_H_
5 #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_PROTOCOL_ERROR_H_
6 #pragma once
7
8 #include <string>
9
10 #include "base/values.h"
11
12 namespace browser_sync{
13 namespace sessions {
14
15 enum SyncProtocolErrorType {
16 // Success case.
17 SUCCESS,
18
19 // Birthday does not match that of the server.
20 NOT_MY_BIRTHDAY,
21
22 // Server is busy. Try later.
23 THROTTLED,
24
25 // Clear user data is being currently executed by the server.
26 CLEAR_PENDING,
27
28 // Server cannot service the request now.
29 TRANSIENT_ERROR,
30
31 // Server does not wish the client to retry any more until the action has
32 // been taken.
33 NON_RETRIABLE_ERROR,
34
35 // Indicates the datatypes have been migrated and the client should resync
36 // them to get the latest progress markers.
37 MIGRATION_DONE,
38
39 // Invalid Credential.
40 INVALID_CREDENTIAL,
41
42 // The default value.
43 UNKNOWN_ERROR
44 };
45
46 enum ClientAction {
47 UPGRADE_CLIENT,
tim (not reviewing) 2011/08/25 15:58:55 Each case here should have a comment.
lipalani1 2011/08/26 20:07:19 Done.
48 CLEAR_USER_DATA_AND_RESYNC,
49 ENABLE_SYNC_ON_ACCOUNT,
50 STOP_AND_RESTART_SYNC,
51 DISABLE_SYNC_ON_CLIENT,
52 UNKNOWN_ACTION
53 };
54
55 struct SyncProtocolError {
56 SyncProtocolErrorType error_type;
57 std::string error_description;
58 std::string url;
59 ClientAction action;
60 SyncProtocolError();
61 ~SyncProtocolError();
62 DictionaryValue* ToValue() const;
63 };
64 } // namespace sessions
65 } // namespace browser_sync
66 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_PROTOCOL_ERROR_H_
67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698