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

Unified Diff: components/sync/engine_impl/test_entry_factory.h

Issue 2630613002: [Sync] USS: Filter out tombstones for initial sync. (Closed)
Patch Set: Fix TestEntryFactory for realz. Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/sync/engine_impl/test_entry_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/test_entry_factory.h
diff --git a/components/sync/engine_impl/test_entry_factory.h b/components/sync/engine_impl/test_entry_factory.h
index 34fe4e987381b458a1d77de51fa6bc504ab1e6de..a02e08f4711603924e38ef52240d6fd5f6a137e8 100644
--- a/components/sync/engine_impl/test_entry_factory.h
+++ b/components/sync/engine_impl/test_entry_factory.h
@@ -18,6 +18,7 @@ namespace syncer {
namespace syncable {
class Directory;
class Id;
+class MutableEntry;
}
class TestEntryFactory {
@@ -57,7 +58,7 @@ class TestEntryFactory {
// the metahandle of the created item.
int64_t CreateUnappliedAndUnsyncedBookmarkItem(const std::string& name);
- // Creates a unique_client_tag item that has neither IS_UNSYNED or
+ // Creates a unique_client_tag item that has neither IS_UNSYNCED or
// IS_UNAPPLIED_UPDATE. The item is known to both the server and client.
// Returns the metahandle of the created item. |specifics| is optional.
int64_t CreateSyncedItem(const std::string& name,
@@ -68,6 +69,9 @@ class TestEntryFactory {
bool is_folder,
const sync_pb::EntitySpecifics& specifics);
+ // Create a tombstone for |name|; returns the metahandle of the entry.
+ int64_t CreateTombstone(const std::string& name, ModelType model_type);
+
// Creates a root node for |model_type|.
int64_t CreateTypeRootNode(ModelType model_type);
@@ -132,6 +136,12 @@ class TestEntryFactory {
int64_t GetNextRevision();
private:
+ // Populate an entry with a bunch of default values.
+ void PopulateEntry(const syncable::Id& parent_id,
+ const std::string& name,
+ ModelType model_type,
+ syncable::MutableEntry* entry);
+
syncable::Directory* directory_;
int64_t next_revision_;
« no previous file with comments | « no previous file | components/sync/engine_impl/test_entry_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698