Chromium Code Reviews| Index: chrome/browser/sync/engine/process_updates_command.cc |
| diff --git a/chrome/browser/sync/engine/process_updates_command.cc b/chrome/browser/sync/engine/process_updates_command.cc |
| index e6763bdc773eeebb88ebcc0b25bd15088a05d1b0..8485a2123d6ca164aae7ad34321167923932198d 100644 |
| --- a/chrome/browser/sync/engine/process_updates_command.cc |
| +++ b/chrome/browser/sync/engine/process_updates_command.cc |
| @@ -22,10 +22,31 @@ namespace browser_sync { |
| using sessions::SyncSession; |
| using sessions::StatusController; |
| +using sessions::UpdateProgress; |
| ProcessUpdatesCommand::ProcessUpdatesCommand() {} |
| ProcessUpdatesCommand::~ProcessUpdatesCommand() {} |
| +std::set<ModelSafeGroup> ProcessUpdatesCommand::GetGroupsToChange( |
| + const sessions::SyncSession& session) const { |
| + std::set<ModelSafeGroup> groups_with_verified_updates; |
| + |
| + const std::set<ModelSafeGroup>& enabled_groups = session.GetEnabledGroups(); |
| + |
| + for (std::set<ModelSafeGroup>::const_iterator it = |
| + enabled_groups.begin(); it != enabled_groups.end(); ++it) { |
| + const UpdateProgress* update_progress = |
| + session.status_controller().GetUnrestrictedUpdateProgress(*it); |
| + if (update_progress && |
| + (update_progress->VerifiedUpdatesBegin() != |
| + update_progress->VerifiedUpdatesEnd())) { |
| + groups_with_verified_updates.insert(*it); |
| + } |
| + } |
| + |
| + return groups_with_verified_updates; |
|
tim (not reviewing)
2011/11/29 00:01:59
again, maybe just keep an index on this when we ad
akalin
2011/11/30 01:33:03
I don't know if I agree with this. Unlike the una
tim (not reviewing)
2011/11/30 02:21:23
OK, yeah lets do that.
|
| +} |
| + |
| bool ProcessUpdatesCommand::ModelNeutralExecuteImpl(SyncSession* session) { |
| const GetUpdatesResponse& updates = |
| session->status_controller().updates_response().get_updates(); |