Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/build_and_process_conflict_sets_command.h" | 5 #include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 backup->ref(syncable::META_HANDLE)); | 109 backup->ref(syncable::META_HANDLE)); |
| 110 CHECK(entry.good()); | 110 CHECK(entry.good()); |
| 111 | 111 |
| 112 if (!entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL))) | 112 if (!entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL))) |
| 113 return false; | 113 return false; |
| 114 | 114 |
| 115 entry.Put(syncable::NON_UNIQUE_NAME, backup->ref(syncable::NON_UNIQUE_NAME)); | 115 entry.Put(syncable::NON_UNIQUE_NAME, backup->ref(syncable::NON_UNIQUE_NAME)); |
| 116 entry.Put(syncable::PARENT_ID, backup->ref(syncable::PARENT_ID)); | 116 entry.Put(syncable::PARENT_ID, backup->ref(syncable::PARENT_ID)); |
| 117 | 117 |
| 118 if (!backup->ref(syncable::IS_DEL)) { | 118 if (!backup->ref(syncable::IS_DEL)) { |
| 119 CHECK(entry.PutPredecessor(backup->ref(syncable::PREV_ID))); | 119 if (!entry.PutPredecessor(backup->ref(syncable::PREV_ID))) |
| 120 return false; | |
|
akalin
2011/10/15 00:21:24
maybe add NOTREACHED() so that it crashes on debug
lipalani1
2011/10/15 00:36:31
Done.
| |
| 120 } | 121 } |
| 121 | 122 |
| 122 if (backup->ref(syncable::PREV_ID) != entry.Get(syncable::PREV_ID)) | 123 if (backup->ref(syncable::PREV_ID) != entry.Get(syncable::PREV_ID)) |
| 123 return false; | 124 return false; |
| 124 | 125 |
| 125 entry.Put(syncable::CTIME, backup->ref(syncable::CTIME)); | 126 entry.Put(syncable::CTIME, backup->ref(syncable::CTIME)); |
| 126 entry.Put(syncable::MTIME, backup->ref(syncable::MTIME)); | 127 entry.Put(syncable::MTIME, backup->ref(syncable::MTIME)); |
| 127 entry.Put(syncable::BASE_VERSION, backup->ref(syncable::BASE_VERSION)); | 128 entry.Put(syncable::BASE_VERSION, backup->ref(syncable::BASE_VERSION)); |
| 128 entry.Put(syncable::IS_DIR, backup->ref(syncable::IS_DIR)); | 129 entry.Put(syncable::IS_DIR, backup->ref(syncable::IS_DIR)); |
| 129 entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL)); | 130 entry.Put(syncable::IS_DEL, backup->ref(syncable::IS_DEL)); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 399 LocallyDeletedPathChecker checker; | 400 LocallyDeletedPathChecker checker; |
| 400 if (!checker.CausingConflict(parent, *entry)) | 401 if (!checker.CausingConflict(parent, *entry)) |
| 401 return; | 402 return; |
| 402 conflict_progress->MergeSets(entry->Get(syncable::ID), | 403 conflict_progress->MergeSets(entry->Get(syncable::ID), |
| 403 parent.Get(syncable::ID)); | 404 parent.Get(syncable::ID)); |
| 404 CrawlDeletedTreeMergingSets(trans, parent, conflict_progress, checker); | 405 CrawlDeletedTreeMergingSets(trans, parent, conflict_progress, checker); |
| 405 } | 406 } |
| 406 } | 407 } |
| 407 | 408 |
| 408 } // namespace browser_sync | 409 } // namespace browser_sync |
| OLD | NEW |