| 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/process_commit_response_command.h" | 5 #include "chrome/browser/sync/engine/process_commit_response_command.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void IncrementErrorCounters(StatusController* status) { | 53 void IncrementErrorCounters(StatusController* status) { |
| 54 status->increment_num_consecutive_errors(); | 54 status->increment_num_consecutive_errors(); |
| 55 } | 55 } |
| 56 void ResetErrorCounters(StatusController* status) { | 56 void ResetErrorCounters(StatusController* status) { |
| 57 status->set_num_consecutive_errors(0); | 57 status->set_num_consecutive_errors(0); |
| 58 } | 58 } |
| 59 | 59 |
| 60 ProcessCommitResponseCommand::ProcessCommitResponseCommand() {} | 60 ProcessCommitResponseCommand::ProcessCommitResponseCommand() {} |
| 61 ProcessCommitResponseCommand::~ProcessCommitResponseCommand() {} | 61 ProcessCommitResponseCommand::~ProcessCommitResponseCommand() {} |
| 62 | 62 |
| 63 bool ProcessCommitResponseCommand::HasCustomGroupsToChange() const { | |
| 64 return true; | |
| 65 } | |
| 66 | |
| 67 std::set<ModelSafeGroup> ProcessCommitResponseCommand::GetGroupsToChange( | 63 std::set<ModelSafeGroup> ProcessCommitResponseCommand::GetGroupsToChange( |
| 68 const sessions::SyncSession& session) const { | 64 const sessions::SyncSession& session) const { |
| 69 std::set<ModelSafeGroup> groups_with_commits; | 65 std::set<ModelSafeGroup> groups_with_commits; |
| 70 syncable::ScopedDirLookup dir(session.context()->directory_manager(), | 66 syncable::ScopedDirLookup dir(session.context()->directory_manager(), |
| 71 session.context()->account_name()); | 67 session.context()->account_name()); |
| 72 if (!dir.good()) { | 68 if (!dir.good()) { |
| 73 LOG(ERROR) << "Scoped dir lookup failed!"; | 69 LOG(ERROR) << "Scoped dir lookup failed!"; |
| 74 return groups_with_commits; | 70 return groups_with_commits; |
| 75 } | 71 } |
| 76 | 72 |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 // been recursively deleted. | 507 // been recursively deleted. |
| 512 // TODO(nick): Here, commit_message.deleted() would be more correct than | 508 // TODO(nick): Here, commit_message.deleted() would be more correct than |
| 513 // local_entry->Get(IS_DEL). For example, an item could be renamed, and then | 509 // local_entry->Get(IS_DEL). For example, an item could be renamed, and then |
| 514 // deleted during the commit of the rename. Unit test & fix. | 510 // deleted during the commit of the rename. Unit test & fix. |
| 515 if (local_entry->Get(IS_DIR) && local_entry->Get(IS_DEL)) { | 511 if (local_entry->Get(IS_DIR) && local_entry->Get(IS_DEL)) { |
| 516 deleted_folders->insert(local_entry->Get(ID)); | 512 deleted_folders->insert(local_entry->Get(ID)); |
| 517 } | 513 } |
| 518 } | 514 } |
| 519 | 515 |
| 520 } // namespace browser_sync | 516 } // namespace browser_sync |
| OLD | NEW |