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

Side by Side Diff: sync/internal_api/public/sessions/model_neutral_state.h

Issue 152013003: Split up SyncEngineEventListener callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 6 years, 10 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 4
5 #ifndef SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H 5 #ifndef SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H
6 #define SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H 6 #define SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "sync/base/sync_export.h" 9 #include "sync/base/sync_export.h"
10 #include "sync/internal_api/public/base/model_type.h"
10 #include "sync/internal_api/public/util/syncer_error.h" 11 #include "sync/internal_api/public/util/syncer_error.h"
11 #include "sync/protocol/sync.pb.h" 12 #include "sync/protocol/sync.pb.h"
12 #include "sync/protocol/sync_protocol_error.h"
13 13
14 namespace syncer { 14 namespace syncer {
15 namespace sessions { 15 namespace sessions {
16 16
17 // Grouping of all state that applies to all model types. Note that some 17 // Grouping of all state that applies to all model types. Note that some
18 // components of the global grouping can internally implement finer grained 18 // components of the global grouping can internally implement finer grained
19 // scope control, but the top level entity is still a singleton with respect to 19 // scope control, but the top level entity is still a singleton with respect to
20 // model types. 20 // model types.
21 struct SYNC_EXPORT ModelNeutralState { 21 struct SYNC_EXPORT ModelNeutralState {
22 ModelNeutralState(); 22 ModelNeutralState();
(...skipping 19 matching lines...) Expand all
42 // Update application and conflicts. 42 // Update application and conflicts.
43 int num_updates_applied; 43 int num_updates_applied;
44 int num_encryption_conflicts; 44 int num_encryption_conflicts;
45 int num_server_conflicts; 45 int num_server_conflicts;
46 int num_hierarchy_conflicts; 46 int num_hierarchy_conflicts;
47 47
48 // Overwrites due to conflict resolution counters. 48 // Overwrites due to conflict resolution counters.
49 int num_local_overwrites; 49 int num_local_overwrites;
50 int num_server_overwrites; 50 int num_server_overwrites;
51 51
52 // Any protocol errors that we received during this sync session.
53 SyncProtocolError sync_protocol_error;
54
55 // Records the most recent results of GetKey, PostCommit and GetUpdates 52 // Records the most recent results of GetKey, PostCommit and GetUpdates
56 // commands. 53 // commands.
57 SyncerError last_get_key_result; 54 SyncerError last_get_key_result;
58 SyncerError last_download_updates_result; 55 SyncerError last_download_updates_result;
59 SyncerError commit_result; 56 SyncerError commit_result;
60 57
61 // Set to true by PostCommitMessageCommand if any commits were successful. 58 // Set to true by PostCommitMessageCommand if any commits were successful.
62 bool items_committed; 59 bool items_committed;
63 60
64 // Number of changes remaining, according to the server. 61 // Number of changes remaining, according to the server.
65 // Take it as an estimate unless it's value is zero, in which case there 62 // Take it as an estimate unless it's value is zero, in which case there
66 // really is nothing more to download. 63 // really is nothing more to download.
67 int64 num_server_changes_remaining; 64 int64 num_server_changes_remaining;
68 }; 65 };
69 66
70 bool HasSyncerError(const ModelNeutralState& state); 67 bool HasSyncerError(const ModelNeutralState& state);
71 68
72 } // namespace sessions 69 } // namespace sessions
73 } // namespace syncer 70 } // namespace syncer
74 71
75 #endif // SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ 72 #endif // SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698