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

Side by Side Diff: sync/engine/apply_updates_and_resolve_conflicts_command.cc

Issue 11474036: Remove initial_sync_ended bits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 8 years 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
« no previous file with comments | « sync/engine/apply_control_data_updates_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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #include "sync/engine/apply_updates_and_resolve_conflicts_command.h" 5 #include "sync/engine/apply_updates_and_resolve_conflicts_command.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "sync/engine/conflict_resolver.h" 8 #include "sync/engine/conflict_resolver.h"
9 #include "sync/engine/update_applicator.h" 9 #include "sync/engine/update_applicator.h"
10 #include "sync/sessions/sync_session.h" 10 #include "sync/sessions/sync_session.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 DCHECK_EQ(conflict_applicator.hierarchy_conflicts(), 121 DCHECK_EQ(conflict_applicator.hierarchy_conflicts(),
122 applicator.hierarchy_conflicts()); 122 applicator.hierarchy_conflicts());
123 123
124 // There should be no simple conflicts remaining. We know this because the 124 // There should be no simple conflicts remaining. We know this because the
125 // resolver should have resolved all the conflicts we detected last time 125 // resolver should have resolved all the conflicts we detected last time
126 // and, by the two previous assertions, that no conflicts have been 126 // and, by the two previous assertions, that no conflicts have been
127 // downgraded from encryption or hierarchy down to simple. 127 // downgraded from encryption or hierarchy down to simple.
128 DCHECK(conflict_applicator.simple_conflict_ids().empty()); 128 DCHECK(conflict_applicator.simple_conflict_ids().empty());
129 } 129 }
130 130
131 // This might be the first time we've fully completed a sync cycle, for
132 // some subset of the currently synced datatypes.
133 if (status->ServerSaysNothingMoreToDownload()) {
134 for (ModelTypeSet::Iterator it =
135 status->updates_request_types().First(); it.Good(); it.Inc()) {
136 // Don't set the flag for control types. We didn't process them here.
137 if (IsControlType(it.Get()))
138 continue;
139
140 // This gets persisted to the directory's backing store.
141 dir->set_initial_sync_ended_for_type(it.Get(), true);
142 }
143 }
144
145 return SYNCER_OK; 131 return SYNCER_OK;
146 } 132 }
147 133
148 } // namespace syncer 134 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/apply_control_data_updates_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698