| 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 83e0d30131e22bc0eac277c0142d5f3542a1b7a1..256c0bbac4d7b8efea2e126a8fab33cabfd60f13 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,32 @@ void ResetErrorCounters(StatusController* status) {
|
| ProcessCommitResponseCommand::ProcessCommitResponseCommand() {}
|
| ProcessCommitResponseCommand::~ProcessCommitResponseCommand() {}
|
|
|
| +bool ProcessCommitResponseCommand::HasCustomGroupsToChange() const {
|
| + // TODO(akalin): Set to true.
|
| + return false;
|
| +}
|
| +
|
| +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(),
|
|
|