| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/internal_api/sync_backup_manager.h" | 5 #include "sync/internal_api/sync_backup_manager.h" |
| 6 | 6 |
| 7 #include "sync/internal_api/public/read_node.h" | 7 #include "sync/internal_api/public/read_node.h" |
| 8 #include "sync/internal_api/public/write_transaction.h" | 8 #include "sync/internal_api/public/write_transaction.h" |
| 9 #include "sync/syncable/directory.h" | 9 #include "sync/syncable/directory.h" |
| 10 #include "sync/syncable/mutable_entry.h" | 10 #include "sync/syncable/mutable_entry.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 in_normalization_ = true; | 106 in_normalization_ = true; |
| 107 for (std::set<int64>::const_iterator it = unsynced_.begin(); | 107 for (std::set<int64>::const_iterator it = unsynced_.begin(); |
| 108 it != unsynced_.end(); ++it) { | 108 it != unsynced_.end(); ++it) { |
| 109 syncable::MutableEntry entry(trans.GetWrappedWriteTrans(), | 109 syncable::MutableEntry entry(trans.GetWrappedWriteTrans(), |
| 110 syncable::GET_BY_HANDLE, *it); | 110 syncable::GET_BY_HANDLE, *it); |
| 111 CHECK(entry.good()); | 111 CHECK(entry.good()); |
| 112 | 112 |
| 113 if (!entry.GetId().ServerKnows()) | 113 if (!entry.GetId().ServerKnows()) |
| 114 entry.PutId(syncable::Id::CreateFromServerId(entry.GetId().value())); | 114 entry.PutId(syncable::Id::CreateFromServerId(entry.GetId().value())); |
| 115 if (!entry.GetParentId().ServerKnows()) { | 115 if (!entry.GetParentId().ServerKnows()) { |
| 116 entry.PutParentId(syncable::Id::CreateFromServerId( | 116 entry.PutParentIdPropertyOnly(syncable::Id::CreateFromServerId( |
| 117 entry.GetParentId().value())); | 117 entry.GetParentId().value())); |
| 118 } | 118 } |
| 119 entry.PutBaseVersion(1); | 119 entry.PutBaseVersion(1); |
| 120 entry.PutIsUnsynced(false); | 120 entry.PutIsUnsynced(false); |
| 121 } | 121 } |
| 122 unsynced_.clear(); | 122 unsynced_.clear(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void SyncBackupManager::HideSyncPreference(ModelType type) { | 125 void SyncBackupManager::HideSyncPreference(ModelType type) { |
| 126 WriteTransaction trans(FROM_HERE, GetUserShare()); | 126 WriteTransaction trans(FROM_HERE, GetUserShare()); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 155 | 155 |
| 156 void SyncBackupManager::UnregisterDirectoryTypeDebugInfoObserver( | 156 void SyncBackupManager::UnregisterDirectoryTypeDebugInfoObserver( |
| 157 syncer::TypeDebugInfoObserver* observer) {} | 157 syncer::TypeDebugInfoObserver* observer) {} |
| 158 | 158 |
| 159 bool SyncBackupManager::HasDirectoryTypeDebugInfoObserver( | 159 bool SyncBackupManager::HasDirectoryTypeDebugInfoObserver( |
| 160 syncer::TypeDebugInfoObserver* observer) { return false; } | 160 syncer::TypeDebugInfoObserver* observer) { return false; } |
| 161 | 161 |
| 162 void SyncBackupManager::RequestEmitDebugInfo() {} | 162 void SyncBackupManager::RequestEmitDebugInfo() {} |
| 163 | 163 |
| 164 } // namespace syncer | 164 } // namespace syncer |
| OLD | NEW |