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

Side by Side Diff: sync/engine/syncer_types.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
« no previous file with comments | « sync/engine/syncer_proto_util_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 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_ENGINE_SYNCER_TYPES_H_
6 #define SYNC_ENGINE_SYNCER_TYPES_H_
7
8 // The intent of this is to keep all shared data types and enums for the syncer
9 // in a single place without having dependencies between other files.
10 namespace syncer {
11
12 enum UpdateAttemptResponse {
13 // Update was applied or safely ignored.
14 SUCCESS,
15
16 // The conditions described by the following enum values are not mutually
17 // exclusive. The list has been ordered according to priority in the case of
18 // overlap, with highest priority first.
19 //
20 // For example, in the case where an item had both the IS_UNSYCNED and
21 // IS_UNAPPLIED_UPDATE flags set (CONFLICT_SIMPLE), and a SERVER_PARENT_ID
22 // that, if applied, would cause a directory loop (CONFLICT_HIERARCHY), and
23 // specifics that we can't decrypt right now (CONFLICT_ENCRYPTION), the
24 // UpdateApplicator would return CONFLICT_ENCRYPTION when attempting to
25 // process the item.
26 //
27 // We do not attempt to resolve CONFLICT_HIERARCHY or CONFLICT_ENCRYPTION
28 // items. We will leave these updates unapplied and wait for the server
29 // to send us newer updates that will resolve the conflict.
30
31 // We were unable to decrypt/encrypt this server data. As such, we can't make
32 // forward progress on this node, but because the passphrase may not arrive
33 // until later we don't want to get the syncer stuck. See UpdateApplicator
34 // for how this is handled.
35 CONFLICT_ENCRYPTION,
36
37 // These are some updates that, if applied, would violate the tree's
38 // invariants. Examples of this include the server adding children to locally
39 // deleted directories and directory moves that would create loops.
40 CONFLICT_HIERARCHY,
41
42 // This indicates that item was modified both remotely (IS_UNAPPLIED_UPDATE)
43 // and locally (IS_UNSYNCED). We use the ConflictResolver to decide which of
44 // the changes should take priority, or if we can possibly merge the data.
45 CONFLICT_SIMPLE
46 };
47
48 // Different results from the verify phase will yield different methods of
49 // processing in the ProcessUpdates phase. The SKIP result means the entry
50 // doesn't go to the ProcessUpdates phase.
51 enum VerifyResult {
52 VERIFY_FAIL,
53 VERIFY_SUCCESS,
54 VERIFY_UNDELETE,
55 VERIFY_SKIP,
56 VERIFY_UNDECIDED
57 };
58
59 enum VerifyCommitResult {
60 VERIFY_UNSYNCABLE,
61 VERIFY_OK,
62 };
63
64 } // namespace syncer
65
66 #endif // SYNC_ENGINE_SYNCER_TYPES_H_
OLDNEW
« no previous file with comments | « sync/engine/syncer_proto_util_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698