| 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 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_TEST_ENTRY_FACTORY_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_TEST_ENTRY_FACTORY_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_TEST_ENTRY_FACTORY_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_TEST_ENTRY_FACTORY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const syncable::Id& parent_id, | 50 const syncable::Id& parent_id, |
| 51 const std::string& name, | 51 const std::string& name, |
| 52 bool is_folder, | 52 bool is_folder, |
| 53 ModelType model_type, | 53 ModelType model_type, |
| 54 int64_t* metahandle_out); | 54 int64_t* metahandle_out); |
| 55 | 55 |
| 56 // Creates a bookmark that is both unsynced an an unapplied update. Returns | 56 // Creates a bookmark that is both unsynced an an unapplied update. Returns |
| 57 // the metahandle of the created item. | 57 // the metahandle of the created item. |
| 58 int64_t CreateUnappliedAndUnsyncedBookmarkItem(const std::string& name); | 58 int64_t CreateUnappliedAndUnsyncedBookmarkItem(const std::string& name); |
| 59 | 59 |
| 60 // Creates a unique_client_tag item that has neither IS_UNSYNED or | 60 // Creates a unique_client_tag item that has neither IS_UNSYNCED or |
| 61 // IS_UNAPPLIED_UPDATE. The item is known to both the server and client. | 61 // IS_UNAPPLIED_UPDATE. The item is known to both the server and client. |
| 62 // Returns the metahandle of the created item. |specifics| is optional. | 62 // Returns the metahandle of the created item. |specifics| is optional. |
| 63 int64_t CreateSyncedItem(const std::string& name, | 63 int64_t CreateSyncedItem(const std::string& name, |
| 64 ModelType model_type, | 64 ModelType model_type, |
| 65 bool is_folder); | 65 bool is_folder); |
| 66 int64_t CreateSyncedItem(const std::string& name, | 66 int64_t CreateSyncedItem(const std::string& name, |
| 67 ModelType model_type, | 67 ModelType model_type, |
| 68 bool is_folder, | 68 bool is_folder, |
| 69 const sync_pb::EntitySpecifics& specifics); | 69 const sync_pb::EntitySpecifics& specifics); |
| 70 | 70 |
| 71 // Create a tombstone for |name|; returns the metahandle of the entry. |
| 72 int64_t CreateTombstone(const std::string& name, ModelType model_type); |
| 73 |
| 71 // Creates a root node for |model_type|. | 74 // Creates a root node for |model_type|. |
| 72 int64_t CreateTypeRootNode(ModelType model_type); | 75 int64_t CreateTypeRootNode(ModelType model_type); |
| 73 | 76 |
| 74 // Creates a root node that IS_UNAPPLIED. Similar to what one would find in | 77 // Creates a root node that IS_UNAPPLIED. Similar to what one would find in |
| 75 // the database between the ProcessUpdates of an initial datatype configure | 78 // the database between the ProcessUpdates of an initial datatype configure |
| 76 // cycle and the ApplyUpdates step of the same sync cycle. | 79 // cycle and the ApplyUpdates step of the same sync cycle. |
| 77 int64_t CreateUnappliedRootNode(ModelType model_type); | 80 int64_t CreateUnappliedRootNode(ModelType model_type); |
| 78 | 81 |
| 79 // Looks up the item referenced by |meta_handle|. If successful, overwrites | 82 // Looks up the item referenced by |meta_handle|. If successful, overwrites |
| 80 // the server specifics with |specifics|, sets | 83 // the server specifics with |specifics|, sets |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 private: | 137 private: |
| 135 syncable::Directory* directory_; | 138 syncable::Directory* directory_; |
| 136 int64_t next_revision_; | 139 int64_t next_revision_; |
| 137 | 140 |
| 138 DISALLOW_COPY_AND_ASSIGN(TestEntryFactory); | 141 DISALLOW_COPY_AND_ASSIGN(TestEntryFactory); |
| 139 }; | 142 }; |
| 140 | 143 |
| 141 } // namespace syncer | 144 } // namespace syncer |
| 142 | 145 |
| 143 #endif // COMPONENTS_SYNC_ENGINE_IMPL_TEST_ENTRY_FACTORY_H_ | 146 #endif // COMPONENTS_SYNC_ENGINE_IMPL_TEST_ENTRY_FACTORY_H_ |
| OLD | NEW |