| 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_rollback_manager_base.h" | 5 #include "sync/internal_api/sync_rollback_manager_base.h" |
| 6 | 6 |
| 7 #include "sync/internal_api/public/base/model_type.h" | 7 #include "sync/internal_api/public/base/model_type.h" |
| 8 #include "sync/internal_api/public/read_node.h" | 8 #include "sync/internal_api/public/read_node.h" |
| 9 #include "sync/internal_api/public/read_transaction.h" | 9 #include "sync/internal_api/public/read_transaction.h" |
| 10 #include "sync/internal_api/public/write_transaction.h" | 10 #include "sync/internal_api/public/write_transaction.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 if (BaseNode::INIT_OK == root.InitTypeRoot(type)) | 263 if (BaseNode::INIT_OK == root.InitTypeRoot(type)) |
| 264 return true; | 264 return true; |
| 265 | 265 |
| 266 syncable::MutableEntry entry(trans.GetWrappedWriteTrans(), | 266 syncable::MutableEntry entry(trans.GetWrappedWriteTrans(), |
| 267 syncable::CREATE_NEW_UPDATE_ITEM, | 267 syncable::CREATE_NEW_UPDATE_ITEM, |
| 268 syncable::Id::CreateFromServerId( | 268 syncable::Id::CreateFromServerId( |
| 269 ModelTypeToString(type))); | 269 ModelTypeToString(type))); |
| 270 if (!entry.good()) | 270 if (!entry.good()) |
| 271 return false; | 271 return false; |
| 272 | 272 |
| 273 entry.PutParentId(syncable::Id()); | 273 entry.PutParentId(syncable::Id::GetRoot()); |
| 274 entry.PutBaseVersion(1); | 274 entry.PutBaseVersion(1); |
| 275 entry.PutUniqueServerTag(ModelTypeToRootTag(type)); | 275 entry.PutUniqueServerTag(ModelTypeToRootTag(type)); |
| 276 entry.PutNonUniqueName(ModelTypeToString(type)); | 276 entry.PutNonUniqueName(ModelTypeToString(type)); |
| 277 entry.PutIsDel(false); | 277 entry.PutIsDel(false); |
| 278 entry.PutIsDir(true); | 278 entry.PutIsDir(true); |
| 279 | 279 |
| 280 sync_pb::EntitySpecifics specifics; | 280 sync_pb::EntitySpecifics specifics; |
| 281 AddDefaultFieldValue(type, &specifics); | 281 AddDefaultFieldValue(type, &specifics); |
| 282 entry.PutSpecifics(specifics); | 282 entry.PutSpecifics(specifics); |
| 283 | 283 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 void SyncRollbackManagerBase::UnregisterDirectoryTypeDebugInfoObserver( | 320 void SyncRollbackManagerBase::UnregisterDirectoryTypeDebugInfoObserver( |
| 321 syncer::TypeDebugInfoObserver* observer) {} | 321 syncer::TypeDebugInfoObserver* observer) {} |
| 322 | 322 |
| 323 bool SyncRollbackManagerBase::HasDirectoryTypeDebugInfoObserver( | 323 bool SyncRollbackManagerBase::HasDirectoryTypeDebugInfoObserver( |
| 324 syncer::TypeDebugInfoObserver* observer) { return false; } | 324 syncer::TypeDebugInfoObserver* observer) { return false; } |
| 325 | 325 |
| 326 void SyncRollbackManagerBase::RequestEmitDebugInfo() {} | 326 void SyncRollbackManagerBase::RequestEmitDebugInfo() {} |
| 327 | 327 |
| 328 } // namespace syncer | 328 } // namespace syncer |
| OLD | NEW |