| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "sync/engine/process_updates_command.h" | 5 #include "sync/engine/process_updates_command.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 case SUCCESS_PROCESSED: | 56 case SUCCESS_PROCESSED: |
| 57 case SUCCESS_STORED: | 57 case SUCCESS_STORED: |
| 58 break; | 58 break; |
| 59 default: | 59 default: |
| 60 NOTREACHED(); | 60 NOTREACHED(); |
| 61 break; | 61 break; |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 StatusController* status = session->mutable_status_controller(); | 65 StatusController* status = session->mutable_status_controller(); |
| 66 status->mutable_update_progress()->CollectUpdatesToApply(dir, &trans); |
| 66 status->mutable_update_progress()->ClearVerifiedUpdates(); | 67 status->mutable_update_progress()->ClearVerifiedUpdates(); |
| 67 return SYNCER_OK; | 68 return SYNCER_OK; |
| 68 } | 69 } |
| 69 | 70 |
| 70 namespace { | 71 namespace { |
| 71 // Returns true if the entry is still ok to process. | 72 // Returns true if the entry is still ok to process. |
| 72 bool ReverifyEntry(syncable::WriteTransaction* trans, const SyncEntity& entry, | 73 bool ReverifyEntry(syncable::WriteTransaction* trans, const SyncEntity& entry, |
| 73 syncable::MutableEntry* same_id) { | 74 syncable::MutableEntry* same_id) { |
| 74 | 75 |
| 75 const bool deleted = entry.has_deleted() && entry.deleted(); | 76 const bool deleted = entry.has_deleted() && entry.deleted(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 target_entry.Put(syncable::BASE_SERVER_SPECIFICS, | 175 target_entry.Put(syncable::BASE_SERVER_SPECIFICS, |
| 175 sync_pb::EntitySpecifics()); | 176 sync_pb::EntitySpecifics()); |
| 176 } | 177 } |
| 177 | 178 |
| 178 SyncerUtil::UpdateServerFieldsFromUpdate(&target_entry, update, name); | 179 SyncerUtil::UpdateServerFieldsFromUpdate(&target_entry, update, name); |
| 179 | 180 |
| 180 return SUCCESS_PROCESSED; | 181 return SUCCESS_PROCESSED; |
| 181 } | 182 } |
| 182 | 183 |
| 183 } // namespace browser_sync | 184 } // namespace browser_sync |
| OLD | NEW |