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

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

Issue 9107055: Remove single direction conflict set code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pre-emptive rebase Created 8 years, 11 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
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 "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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc ('k') | chrome/browser/sync/sessions/session_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698