Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: components/sync/engine_impl/test_entry_factory.h

Issue 2442583003: [Sync] Start implementation of migration for USS. (Closed)
Patch Set: Rebase. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_UNSYNED 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. 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,
67 ModelType model_type,
68 bool is_folder,
69 const sync_pb::EntitySpecifics& specifics);
70
71 // Creates a root node for |model_type|.
72 int64_t CreateTypeRootNode(ModelType model_type);
66 73
67 // Creates a root node that IS_UNAPPLIED. Similar to what one would find in 74 // Creates a root node that IS_UNAPPLIED. Similar to what one would find in
68 // the database between the ProcessUpdates of an initial datatype configure 75 // the database between the ProcessUpdates of an initial datatype configure
69 // cycle and the ApplyUpdates step of the same sync cycle. 76 // cycle and the ApplyUpdates step of the same sync cycle.
70 int64_t CreateUnappliedRootNode(ModelType model_type); 77 int64_t CreateUnappliedRootNode(ModelType model_type);
71 78
72 // Looks up the item referenced by |meta_handle|. If successful, overwrites 79 // Looks up the item referenced by |meta_handle|. If successful, overwrites
73 // the server specifics with |specifics|, sets 80 // the server specifics with |specifics|, sets
74 // IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true. 81 // IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
75 // Else, return false. 82 // Else, return false.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 private: 134 private:
128 syncable::Directory* directory_; 135 syncable::Directory* directory_;
129 int64_t next_revision_; 136 int64_t next_revision_;
130 137
131 DISALLOW_COPY_AND_ASSIGN(TestEntryFactory); 138 DISALLOW_COPY_AND_ASSIGN(TestEntryFactory);
132 }; 139 };
133 140
134 } // namespace syncer 141 } // namespace syncer
135 142
136 #endif // COMPONENTS_SYNC_ENGINE_IMPL_TEST_ENTRY_FACTORY_H_ 143 #endif // COMPONENTS_SYNC_ENGINE_IMPL_TEST_ENTRY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698