diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-11 22:09:54 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-11 22:09:54 +0000 |
commit | 82f4abc7c4c2a91ce62a56a0c0ae06af0fa51305 (patch) | |
tree | 02955f0781609f84e955b2d80486a3bafd9c58ba /sync/internal_api/public | |
parent | 7b83f7eadd08a3e5fdebb4aa6a2c6fabecc9cdc4 (diff) | |
download | chromium_src-82f4abc7c4c2a91ce62a56a0c0ae06af0fa51305.zip chromium_src-82f4abc7c4c2a91ce62a56a0c0ae06af0fa51305.tar.gz chromium_src-82f4abc7c4c2a91ce62a56a0c0ae06af0fa51305.tar.bz2 |
[Sync] Notify the datatype of the current context on startup
In order to support context triggered refreshes, the datatype must know
what the current context is at startup to decide whether a refresh must
be performed or not. We will now invoke UpdateDataTypeContext before
MergeDataAndStartSyncing if a valid context exists.
BUG=357368
R=rlarocque@chromium.org
Review URL: https://codereview.chromium.org/233833003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public')
-rw-r--r-- | sync/internal_api/public/read_transaction.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sync/internal_api/public/read_transaction.h b/sync/internal_api/public/read_transaction.h index 02e2633..3a3dc8d 100644 --- a/sync/internal_api/public/read_transaction.h +++ b/sync/internal_api/public/read_transaction.h @@ -13,6 +13,10 @@ namespace tracked_objects { class Location; } // namespace tracked_objects +namespace sync_pb { +class DataTypeContext; +} + namespace syncer { struct UserShare; @@ -35,7 +39,11 @@ class SYNC_EXPORT ReadTransaction : public BaseTransaction { // Return |transaction_version| of |type| stored in sync directory's // persisted info. - int64 GetModelVersion(ModelType type); + int64 GetModelVersion(ModelType type) const; + + // Fills |context| with the datatype context associated with |type|. + void GetDataTypeContext(ModelType type, + sync_pb::DataTypeContext* context) const; private: void* operator new(size_t size); // Transaction is meant for stack use only. |