Chromium Code Reviews| Index: sync/engine/apply_updates_command.cc |
| diff --git a/sync/engine/apply_updates_command.cc b/sync/engine/apply_updates_command.cc |
| index da8a1cc4c2e987d464445cfbef8bd63cd0be4513..2379cbd70f01cc8506788b604c31151d4416f0e7 100644 |
| --- a/sync/engine/apply_updates_command.cc |
| +++ b/sync/engine/apply_updates_command.cc |
| @@ -57,6 +57,12 @@ SyncerError ApplyUpdatesCommand::ModelChangingExecuteImpl( |
| } |
| } |
| + // Don't process control type updates here. They will be handled elsewhere. |
| + ModelTypeSet control_types = ControlTypes(); |
| + for (ModelTypeSet::Iterator i = control_types.First(); i.Good(); i.Inc()) { |
| + server_type_restriction.Remove(i.Get()); |
|
tim (not reviewing)
2012/08/30 20:18:33
This would be nicer to read as a single line 'Remo
rlarocque
2012/08/30 21:01:48
I feel the same way. I'd like to enforce that we
tim (not reviewing)
2012/08/30 21:41:04
I was really thinking low key, like
full_set.Diff
|
| + } |
| + |
| std::vector<int64> handles; |
| dir->GetUnappliedUpdateMetaHandles( |
| &trans, server_type_restriction, &handles); |
| @@ -77,8 +83,11 @@ SyncerError ApplyUpdatesCommand::ModelChangingExecuteImpl( |
| if (status.ServerSaysNothingMoreToDownload()) { |
| for (ModelTypeSet::Iterator it = |
| status.updates_request_types().First(); it.Good(); it.Inc()) { |
| - // This gets persisted to the directory's backing store. |
| - dir->set_initial_sync_ended_for_type(it.Get(), true); |
| + // Don't set the flag for control types. We didn't process them here. |
| + if (!IsControlType(it.Get())) { |
|
tim (not reviewing)
2012/08/30 20:18:33
style nit - It's a bit less unintuitive treat the
tim (not reviewing)
2012/08/30 20:40:07
Heh, speaking of double negatives ... "it's a bit
rlarocque
2012/08/30 21:01:48
That's how I did it originally, but then I figured
|
| + // This gets persisted to the directory's backing store. |
| + dir->set_initial_sync_ended_for_type(it.Get(), true); |
| + } |
| } |
| } |