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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_MODEL_NEUTRAL_STATE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_SESSIONS_MODEL_NEUTRAL_STATE_H_
7
8 #include "sync/base/sync_export.h"
9 #include "sync/internal_api/public/base/model_type.h"
10 #include "sync/internal_api/public/util/syncer_error.h"
11 #include "sync/protocol/sync.pb.h"
12
13 namespace syncer {
14 namespace sessions {
15
16 // Grouping of all state that applies to all model types. Note that some
17 // components of the global grouping can internally implement finer grained
18 // scope control, but the top level entity is still a singleton with respect to
19 // model types.
20 struct SYNC_EXPORT ModelNeutralState {
21 ModelNeutralState();
22 ModelNeutralState(const ModelNeutralState& other);
23 ~ModelNeutralState();
24
25 // The set of types for which updates were requested from the server.
26 ModelTypeSet get_updates_request_types;
27
28 // The set of types for which commits were sent to the server.
29 ModelTypeSet commit_request_types;
30
31 int num_successful_commits;
32
33 // This is needed for monitoring extensions activity.
34 int num_successful_bookmark_commits;
35
36 // Download event counters.
37 int num_updates_downloaded_total;
38 int num_tombstone_updates_downloaded_total;
39 int num_reflected_updates_downloaded_total;
40
41 // Update application and conflicts.
42 int num_updates_applied;
43 int num_encryption_conflicts;
44 int num_server_conflicts;
45 int num_hierarchy_conflicts;
46
47 // Overwrites due to conflict resolution counters.
48 int num_local_overwrites;
49 int num_server_overwrites;
50
51 // Records the most recent results of GetKey, PostCommit and GetUpdates
52 // commands.
53 SyncerError last_get_key_result;
54 SyncerError last_download_updates_result;
55 SyncerError commit_result;
56
57 // Set to true by PostCommitMessageCommand if any commits were successful.
58 bool items_committed;
59 };
60
61 SYNC_EXPORT bool HasSyncerError(const ModelNeutralState& state);
62
63 } // namespace sessions
64 } // namespace syncer
65
66 #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_MODEL_NEUTRAL_STATE_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/sessions/commit_counters.cc ('k') | sync/internal_api/public/sessions/model_neutral_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698