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

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

Issue 393083004: Update Commit and GetUpdatesResponse messages to include attachment ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update SyncManagerImpl to detect attachment metadata changes. Created 6 years, 5 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
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 7ca79e6e1f37fb3ea08ecbaccfaeb0f8581444ce..97ff25e418fb2acc310fab4cdfaa953e1aa166d1 100644
--- a/sync/internal_api/public/test/test_entry_factory.h
+++ b/sync/internal_api/public/test/test_entry_factory.h
@@ -61,7 +61,7 @@ class TestEntryFactory {
int64 CreateSyncedItem(const std::string& name,
ModelType model_type, bool is_folder);
- // Creates a root node that IS_UNAPPLIED. Smiilar to what one would find in
+ // Creates a root node that IS_UNAPPLIED. Similar to what one would find in
// the database between the ProcessUpdates of an initial datatype configure
// cycle and the ApplyUpdates step of the same sync cycle.
int64 CreateUnappliedRootNode(ModelType model_type);
@@ -80,16 +80,41 @@ class TestEntryFactory {
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.
+ // Looks up the item referenced by |meta_handle| and returns its server
+ // specifics.
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.
+ // Looks up the item referenced by |meta_handle| and returns its specifics.
const sync_pb::EntitySpecifics& GetLocalSpecificsForItem(
int64 meta_handle) const;
+ // Looks up the item referenced by |meta_handle|. If successful, overwrites
+ // the server attachment metadata with |metadata|, sets
+ // IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
+ // Else, return false.
+ bool SetServerAttachmentMetadataForItem(
+ int64 meta_handle,
+ const sync_pb::AttachmentMetadata metadata);
+
+ // Looks up the item referenced by |meta_handle|. If successful, overwrites
+ // the local attachment metadata with |metadata|, sets
+ // IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
+ // Else, return false.
+ bool SetLocalAttachmentMetadataForItem(
+ int64 meta_handle,
+ const sync_pb::AttachmentMetadata metadata);
+
+ // Looks up the item referenced by |meta_handle| and returns its server
+ // attachment metadata.
+ const sync_pb::AttachmentMetadata& GetServerAttachmentMetadataForItem(
+ int64 meta_handle) const;
+
+ // Looks up the item referenced by |meta_handle| and returns its attachment
+ // metadata.
+ const sync_pb::AttachmentMetadata& GetLocalAttachmentMetadataForItem(
+ 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;
« no previous file with comments | « sync/internal_api/public/base/attachment_id_proto_unittest.cc ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698