OLD | NEW |
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 "chrome/browser/sync/engine/syncer.h" | 5 #include "chrome/browser/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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 ProcessCommitResponseCommand process_response_command; | 233 ProcessCommitResponseCommand process_response_command; |
234 session->mutable_status_controller()-> | 234 session->mutable_status_controller()-> |
235 set_last_process_commit_response_result( | 235 set_last_process_commit_response_result( |
236 process_response_command.Execute(session)); | 236 process_response_command.Execute(session)); |
237 next_step = BUILD_AND_PROCESS_CONFLICT_SETS; | 237 next_step = BUILD_AND_PROCESS_CONFLICT_SETS; |
238 break; | 238 break; |
239 } | 239 } |
240 case BUILD_AND_PROCESS_CONFLICT_SETS: { | 240 case BUILD_AND_PROCESS_CONFLICT_SETS: { |
241 BuildAndProcessConflictSetsCommand build_process_conflict_sets; | 241 BuildAndProcessConflictSetsCommand build_process_conflict_sets; |
242 build_process_conflict_sets.Execute(session); | 242 build_process_conflict_sets.Execute(session); |
243 if (session->status_controller().conflict_sets_built()) | 243 next_step = RESOLVE_CONFLICTS; |
244 next_step = SYNCER_END; | |
245 else | |
246 next_step = RESOLVE_CONFLICTS; | |
247 break; | 244 break; |
248 } | 245 } |
249 case RESOLVE_CONFLICTS: { | 246 case RESOLVE_CONFLICTS: { |
250 StatusController* status = session->mutable_status_controller(); | 247 StatusController* status = session->mutable_status_controller(); |
251 status->reset_conflicts_resolved(); | 248 status->reset_conflicts_resolved(); |
252 ResolveConflictsCommand resolve_conflicts_command; | 249 ResolveConflictsCommand resolve_conflicts_command; |
253 resolve_conflicts_command.Execute(session); | 250 resolve_conflicts_command.Execute(session); |
254 | 251 |
255 // Has ConflictingUpdates includes both blocking and non-blocking | 252 // Has ConflictingUpdates includes both blocking and non-blocking |
256 // conflicts. If we have either, we want to attempt to reapply. | 253 // conflicts. If we have either, we want to attempt to reapply. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 entry->Put(SERVER_CTIME, Time()); | 352 entry->Put(SERVER_CTIME, Time()); |
356 entry->Put(SERVER_VERSION, 0); | 353 entry->Put(SERVER_VERSION, 0); |
357 entry->Put(SERVER_IS_DIR, false); | 354 entry->Put(SERVER_IS_DIR, false); |
358 entry->Put(SERVER_IS_DEL, false); | 355 entry->Put(SERVER_IS_DEL, false); |
359 entry->Put(IS_UNAPPLIED_UPDATE, false); | 356 entry->Put(IS_UNAPPLIED_UPDATE, false); |
360 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); | 357 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); |
361 entry->Put(SERVER_POSITION_IN_PARENT, 0); | 358 entry->Put(SERVER_POSITION_IN_PARENT, 0); |
362 } | 359 } |
363 | 360 |
364 } // namespace browser_sync | 361 } // namespace browser_sync |
OLD | NEW |