OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/sync/engine/syncer_util.h" | 5 #include "chrome/browser/sync/engine/syncer_util.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 281 matching lines...) Loading... |
292 Directory::ChildHandles handles; | 292 Directory::ChildHandles handles; |
293 trans->directory()->GetChildHandles(trans, id, &handles); | 293 trans->directory()->GetChildHandles(trans, id, &handles); |
294 if (!handles.empty()) { | 294 if (!handles.empty()) { |
295 // If we have still-existing children, then we need to deal with | 295 // If we have still-existing children, then we need to deal with |
296 // them before we can process this change. | 296 // them before we can process this change. |
297 LOG(INFO) << "Not deleting directory; it's not empty " << *entry; | 297 LOG(INFO) << "Not deleting directory; it's not empty " << *entry; |
298 return CONFLICT; | 298 return CONFLICT; |
299 } | 299 } |
300 } | 300 } |
301 | 301 |
302 int64 old_version = entry->Get(BASE_VERSION); | |
303 SyncerUtil::UpdateLocalDataFromServerData(trans, entry); | 302 SyncerUtil::UpdateLocalDataFromServerData(trans, entry); |
304 | 303 |
305 return SUCCESS; | 304 return SUCCESS; |
306 } | 305 } |
307 | 306 |
308 // Pass in name and checksum because of UTF8 conversion. | 307 // Pass in name and checksum because of UTF8 conversion. |
309 // static | 308 // static |
310 void SyncerUtil::UpdateServerFieldsFromUpdate( | 309 void SyncerUtil::UpdateServerFieldsFromUpdate( |
311 MutableEntry* local_entry, | 310 MutableEntry* local_entry, |
312 const SyncEntity& server_entry, | 311 const SyncEntity& server_entry, |
(...skipping 521 matching lines...) Loading... |
834 | 833 |
835 // |update_entry| is considered to be somewhere after |candidate|, so store | 834 // |update_entry| is considered to be somewhere after |candidate|, so store |
836 // it as the upper bound. | 835 // it as the upper bound. |
837 closest_sibling = candidate.Get(ID); | 836 closest_sibling = candidate.Get(ID); |
838 } | 837 } |
839 | 838 |
840 return closest_sibling; | 839 return closest_sibling; |
841 } | 840 } |
842 | 841 |
843 } // namespace browser_sync | 842 } // namespace browser_sync |
OLD | NEW |