| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |