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

Unified Diff: sync/internal_api/public/test/test_entry_factory.h

Issue 10905191: [Sync] Add keystore migration conflict support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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 | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/sync_encryption_handler_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/test/test_entry_factory.h
diff --git a/sync/internal_api/public/test/test_entry_factory.h b/sync/internal_api/public/test/test_entry_factory.h
index 83efe2643e9b6a2b7a561f10ca7f46920b41dfc9..1661a33562d071c29cff6880ca57c1734b4b97ae 100644
--- a/sync/internal_api/public/test/test_entry_factory.h
+++ b/sync/internal_api/public/test/test_entry_factory.h
@@ -30,9 +30,9 @@ class TestEntryFactory {
const std::string& parent_id);
// Create a new unapplied update without a parent.
- void CreateUnappliedNewItem(const std::string& item_id,
- const sync_pb::EntitySpecifics& specifics,
- bool is_unique);
+ int64 CreateUnappliedNewItem(const std::string& item_id,
+ const sync_pb::EntitySpecifics& specifics,
+ bool is_unique);
// Create an unsynced item in the database. If item_id is a local ID, it will
// be treated as a create-new. Otherwise, if it's a server ID, we'll fake the
@@ -56,6 +56,34 @@ class TestEntryFactory {
int64 CreateSyncedItem(const std::string& name,
ModelType model_type, bool is_folder);
+ // Looks up the item referenced by |meta_handle|. If successful, overwrites
+ // the server specifics with |specifics|, sets
+ // IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
+ // Else, return false.
+ bool SetServerSpecificsForItem(int64 meta_handle,
+ const sync_pb::EntitySpecifics specifics);
+
+ // Looks up the item referenced by |meta_handle|. If successful, overwrites
+ // the local specifics with |specifics|, sets
+ // IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
+ // Else, return false.
+ bool SetLocalSpecificsForItem(int64 meta_handle,
+ const sync_pb::EntitySpecifics specifics);
+
+ // Looks up the item referenced by |meta_handle|. If successful, stores
+ // the server specifics into |specifics| and returns true. Else, return false.
+ const sync_pb::EntitySpecifics& GetServerSpecificsForItem(
+ int64 meta_handle) const;
+
+ // Looks up the item referenced by |meta_handle|. If successful, stores
+ // the local specifics into |specifics| and returns true. Else, return false.
+ const sync_pb::EntitySpecifics& GetLocalSpecificsForItem(
+ int64 meta_handle) const;
+
+ // Getters for IS_UNSYNCED and IS_UNAPPLIED_UPDATE bit fields.
+ bool GetIsUnsyncedForItem(int64 meta_handle) const;
+ bool GetIsUnappliedForItem(int64 meta_handle) const;
+
int64 GetNextRevision();
private:
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/sync_encryption_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698