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

Side by Side Diff: chrome/browser/sync/engine/conflict_resolution_view.cc

Issue 386030: Relieve SyncerSession,SyncCycleState, SyncProcessState, SyncerSession, Syncer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2006-2009 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 // THIS CLASS PROVIDES NO SYNCHRONIZATION GUARANTEES.
6
7 #include "chrome/browser/sync/engine/conflict_resolution_view.h"
8
9 #include <map>
10 #include <set>
11
12 #include "chrome/browser/sync/engine/sync_process_state.h"
13 #include "chrome/browser/sync/engine/syncer_session.h"
14
15 using std::map;
16 using std::set;
17
18 namespace browser_sync {
19
20 ConflictResolutionView::ConflictResolutionView(SyncerSession* session)
21 : process_state_(session->sync_process_state_) {}
22
23 int ConflictResolutionView::conflicting_updates() const {
24 return process_state_->conflicting_updates();
25 }
26
27 int ConflictResolutionView::conflicting_commits() const {
28 return process_state_->conflicting_commits();
29 }
30
31 void ConflictResolutionView::set_conflicting_commits(const int val) {
32 process_state_->set_conflicting_commits(val);
33 }
34
35 int64 ConflictResolutionView::current_sync_timestamp() const {
36 return process_state_->current_sync_timestamp();
37 }
38
39 int64 ConflictResolutionView::num_server_changes_remaining() const {
40 return process_state_->num_server_changes_remaining();
41 }
42
43 // True iff we're stuck. User should contact support.
44 bool ConflictResolutionView::syncer_stuck() const {
45 return process_state_->syncer_stuck();
46 }
47
48 void ConflictResolutionView::set_syncer_stuck(const bool val) {
49 process_state_->set_syncer_stuck(val);
50 }
51
52 IdToConflictSetMap::const_iterator ConflictResolutionView::IdToConflictSetFind(
53 const syncable::Id& the_id) const {
54 return process_state_->IdToConflictSetFind(the_id);
55 }
56
57 IdToConflictSetMap::const_iterator
58 ConflictResolutionView::IdToConflictSetBegin() const {
59 return process_state_->IdToConflictSetBegin();
60 }
61
62 IdToConflictSetMap::const_iterator
63 ConflictResolutionView::IdToConflictSetEnd() const {
64 return process_state_->IdToConflictSetEnd();
65 }
66
67 IdToConflictSetMap::size_type
68 ConflictResolutionView::IdToConflictSetSize() const {
69 return process_state_->IdToConflictSetSize();
70 }
71
72 const ConflictSet*
73 ConflictResolutionView::IdToConflictSetGet(const syncable::Id& the_id) {
74 return process_state_->IdToConflictSetGet(the_id);
75 }
76
77 set<ConflictSet*>::const_iterator
78 ConflictResolutionView::ConflictSetsBegin() const {
79 return process_state_->ConflictSetsBegin();
80 }
81
82 set<ConflictSet*>::const_iterator
83 ConflictResolutionView::ConflictSetsEnd() const {
84 return process_state_->ConflictSetsEnd();
85 }
86
87 set<ConflictSet*>::size_type
88 ConflictResolutionView::ConflictSetsSize() const {
89 return process_state_->ConflictSetsSize();
90 }
91
92 void ConflictResolutionView::MergeSets(const syncable::Id& set1,
93 const syncable::Id& set2) {
94 process_state_->MergeSets(set1, set2);
95 }
96
97 void ConflictResolutionView::CleanupSets() {
98 process_state_->CleanupSets();
99 }
100
101 bool ConflictResolutionView::HasCommitConflicts() const {
102 return process_state_->HasConflictingItems();
103 }
104
105 int ConflictResolutionView::CommitConflictsSize() const {
106 return process_state_->ConflictingItemsSize();
107 }
108
109 void ConflictResolutionView::AddCommitConflict(const syncable::Id& the_id) {
110 process_state_->AddConflictingItem(the_id);
111 }
112
113 void ConflictResolutionView::EraseCommitConflict(
114 set<syncable::Id>::iterator it) {
115 process_state_->EraseConflictingItem(it);
116 }
117
118 set<syncable::Id>::iterator
119 ConflictResolutionView::CommitConflictsBegin() const {
120 return process_state_->ConflictingItemsBegin();
121 }
122
123 set<syncable::Id>::iterator
124 ConflictResolutionView::CommitConflictsEnd() const {
125 return process_state_->ConflictingItemsEnd();
126 }
127
128 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/conflict_resolution_view.h ('k') | chrome/browser/sync/engine/conflict_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698