| Index: chrome/browser/sync/engine/process_commit_response_command.cc
|
| diff --git a/chrome/browser/sync/engine/process_commit_response_command.cc b/chrome/browser/sync/engine/process_commit_response_command.cc
|
| index 7a7113f89c4b206e2ab3f093cbc3171ed5cd1b0c..23b89772a3a97e35a05aec50c2492f89b2b18798 100644
|
| --- a/chrome/browser/sync/engine/process_commit_response_command.cc
|
| +++ b/chrome/browser/sync/engine/process_commit_response_command.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/sync/engine/process_commit_response_command.h"
|
|
|
| +#include <cstddef>
|
| #include <set>
|
| #include <string>
|
| #include <vector>
|
| @@ -59,6 +60,27 @@ void ResetErrorCounters(StatusController* status) {
|
| ProcessCommitResponseCommand::ProcessCommitResponseCommand() {}
|
| ProcessCommitResponseCommand::~ProcessCommitResponseCommand() {}
|
|
|
| +std::set<ModelSafeGroup> ProcessCommitResponseCommand::GetGroupsToChange(
|
| + const sessions::SyncSession& session) const {
|
| + std::set<ModelSafeGroup> groups_with_commits;
|
| + syncable::ScopedDirLookup dir(session.context()->directory_manager(),
|
| + session.context()->account_name());
|
| + if (!dir.good()) {
|
| + LOG(ERROR) << "Scoped dir lookup failed!";
|
| + return groups_with_commits;
|
| + }
|
| +
|
| + syncable::ReadTransaction trans(FROM_HERE, dir);
|
| + const StatusController& status = session.status_controller();
|
| + for (size_t i = 0; i < status.commit_ids().size(); ++i) {
|
| + groups_with_commits.insert(
|
| + GetGroupForModelType(status.GetUnrestrictedCommitModelTypeAt(i),
|
| + session.routing_info()));
|
| + }
|
| +
|
| + return groups_with_commits;
|
| +}
|
| +
|
| bool ProcessCommitResponseCommand::ModelNeutralExecuteImpl(
|
| sessions::SyncSession* session) {
|
| ScopedDirLookup dir(session->context()->directory_manager(),
|
|
|