| 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/internal_api/public/test/test_entry_factory.h" | 5 #include "sync/internal_api/public/test/test_entry_factory.h" |
| 6 | 6 |
| 7 #include "sync/syncable/directory.h" | 7 #include "sync/syncable/directory.h" |
| 8 #include "sync/syncable/mutable_entry.h" | 8 #include "sync/syncable/mutable_entry.h" |
| 9 #include "sync/syncable/syncable_id.h" | 9 #include "sync/syncable/syncable_id.h" |
| 10 #include "sync/syncable/write_transaction.h" | 10 #include "sync/syncable/write_transaction.h" |
| 11 #include "sync/test/engine/test_id_factory.h" | 11 #include "sync/test/engine/test_id_factory.h" |
| 12 | 12 |
| 13 using std::string; | 13 using std::string; |
| 14 using syncable::Id; | 14 using syncable::Id; |
| 15 using syncable::MutableEntry; | 15 using syncable::MutableEntry; |
| 16 using syncable::UNITTEST; | 16 using syncable::UNITTEST; |
| 17 using syncable::WriteTransaction; | 17 using syncable::WriteTransaction; |
| 18 | 18 |
| 19 namespace csync { | 19 namespace syncer { |
| 20 | 20 |
| 21 TestEntryFactory::TestEntryFactory(syncable::Directory *dir) | 21 TestEntryFactory::TestEntryFactory(syncable::Directory *dir) |
| 22 : directory_(dir), next_revision_(1) { | 22 : directory_(dir), next_revision_(1) { |
| 23 } | 23 } |
| 24 | 24 |
| 25 TestEntryFactory::~TestEntryFactory() { } | 25 TestEntryFactory::~TestEntryFactory() { } |
| 26 | 26 |
| 27 void TestEntryFactory::CreateUnappliedNewItemWithParent( | 27 void TestEntryFactory::CreateUnappliedNewItemWithParent( |
| 28 const string& item_id, | 28 const string& item_id, |
| 29 const sync_pb::EntitySpecifics& specifics, | 29 const sync_pb::EntitySpecifics& specifics, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 entry.Put(syncable::SERVER_SPECIFICS, default_specifics); | 155 entry.Put(syncable::SERVER_SPECIFICS, default_specifics); |
| 156 entry.Put(syncable::SERVER_PARENT_ID, parent_id); | 156 entry.Put(syncable::SERVER_PARENT_ID, parent_id); |
| 157 | 157 |
| 158 return entry.Get(syncable::META_HANDLE); | 158 return entry.Get(syncable::META_HANDLE); |
| 159 } | 159 } |
| 160 | 160 |
| 161 int64 TestEntryFactory::GetNextRevision() { | 161 int64 TestEntryFactory::GetNextRevision() { |
| 162 return next_revision_++; | 162 return next_revision_++; |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace csync | 165 } // namespace syncer |
| OLD | NEW |