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

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

Issue 10523003: Refactor following sync commit loop change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 8 years, 6 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
« no previous file with comments | « sync/engine/process_commit_response_command.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/syncer.h" 5 #include "sync/engine/syncer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // We're in configuration mode, but we still need to run the 175 // We're in configuration mode, but we still need to run the
176 // SYNCER_END step. 176 // SYNCER_END step.
177 last_step = SYNCER_END; 177 last_step = SYNCER_END;
178 next_step = SYNCER_END; 178 next_step = SYNCER_END;
179 } else { 179 } else {
180 next_step = COMMIT; 180 next_step = COMMIT;
181 } 181 }
182 break; 182 break;
183 } 183 }
184 case COMMIT: { 184 case COMMIT: {
185 BuildAndPostCommits(this, session); 185 session->mutable_status_controller()->set_commit_result(
186 BuildAndPostCommits(this, session));
186 next_step = RESOLVE_CONFLICTS; 187 next_step = RESOLVE_CONFLICTS;
187 break; 188 break;
188 } 189 }
189 case RESOLVE_CONFLICTS: { 190 case RESOLVE_CONFLICTS: {
190 StatusController* status = session->mutable_status_controller(); 191 StatusController* status = session->mutable_status_controller();
191 status->reset_conflicts_resolved(); 192 status->reset_conflicts_resolved();
192 ResolveConflictsCommand resolve_conflicts_command; 193 ResolveConflictsCommand resolve_conflicts_command;
193 resolve_conflicts_command.Execute(session); 194 resolve_conflicts_command.Execute(session);
194 195
195 // Has ConflictingUpdates includes both resolvable and unresolvable 196 // Has ConflictingUpdates includes both resolvable and unresolvable
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 entry->Put(SERVER_CTIME, Time()); 297 entry->Put(SERVER_CTIME, Time());
297 entry->Put(SERVER_VERSION, 0); 298 entry->Put(SERVER_VERSION, 0);
298 entry->Put(SERVER_IS_DIR, false); 299 entry->Put(SERVER_IS_DIR, false);
299 entry->Put(SERVER_IS_DEL, false); 300 entry->Put(SERVER_IS_DEL, false);
300 entry->Put(IS_UNAPPLIED_UPDATE, false); 301 entry->Put(IS_UNAPPLIED_UPDATE, false);
301 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); 302 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance());
302 entry->Put(SERVER_POSITION_IN_PARENT, 0); 303 entry->Put(SERVER_POSITION_IN_PARENT, 0);
303 } 304 }
304 305
305 } // namespace browser_sync 306 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/engine/process_commit_response_command.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698