| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/build_and_process_conflict_sets_command.h" | 5 #include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 using sessions::SyncSession; | 24 using sessions::SyncSession; |
| 25 using sessions::UpdateProgress; | 25 using sessions::UpdateProgress; |
| 26 using std::set; | 26 using std::set; |
| 27 using std::string; | 27 using std::string; |
| 28 using std::vector; | 28 using std::vector; |
| 29 | 29 |
| 30 BuildAndProcessConflictSetsCommand::BuildAndProcessConflictSetsCommand() {} | 30 BuildAndProcessConflictSetsCommand::BuildAndProcessConflictSetsCommand() {} |
| 31 BuildAndProcessConflictSetsCommand::~BuildAndProcessConflictSetsCommand() {} | 31 BuildAndProcessConflictSetsCommand::~BuildAndProcessConflictSetsCommand() {} |
| 32 | 32 |
| 33 bool BuildAndProcessConflictSetsCommand::HasCustomGroupsToChange() const { | 33 bool BuildAndProcessConflictSetsCommand::HasCustomGroupsToChange() const { |
| 34 // TODO(akalin): Set to true. | 34 return true; |
| 35 return false; | |
| 36 } | 35 } |
| 37 | 36 |
| 38 std::set<ModelSafeGroup> BuildAndProcessConflictSetsCommand::GetGroupsToChange( | 37 std::set<ModelSafeGroup> BuildAndProcessConflictSetsCommand::GetGroupsToChange( |
| 39 const sessions::SyncSession& session) const { | 38 const sessions::SyncSession& session) const { |
| 40 return session.GetEnabledGroupsWithConflicts(); | 39 return session.GetEnabledGroupsWithConflicts(); |
| 41 } | 40 } |
| 42 | 41 |
| 43 void BuildAndProcessConflictSetsCommand::ModelChangingExecuteImpl( | 42 void BuildAndProcessConflictSetsCommand::ModelChangingExecuteImpl( |
| 44 SyncSession* session) { | 43 SyncSession* session) { |
| 45 session->mutable_status_controller()->update_conflict_sets_built( | 44 session->mutable_status_controller()->update_conflict_sets_built( |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 LocallyDeletedPathChecker checker; | 414 LocallyDeletedPathChecker checker; |
| 416 if (!checker.CausingConflict(parent, *entry)) | 415 if (!checker.CausingConflict(parent, *entry)) |
| 417 return; | 416 return; |
| 418 conflict_progress->MergeSets(entry->Get(syncable::ID), | 417 conflict_progress->MergeSets(entry->Get(syncable::ID), |
| 419 parent.Get(syncable::ID)); | 418 parent.Get(syncable::ID)); |
| 420 CrawlDeletedTreeMergingSets(trans, parent, conflict_progress, checker); | 419 CrawlDeletedTreeMergingSets(trans, parent, conflict_progress, checker); |
| 421 } | 420 } |
| 422 } | 421 } |
| 423 | 422 |
| 424 } // namespace browser_sync | 423 } // namespace browser_sync |
| OLD | NEW |