forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync: Implement sharing of sync data in the directory using ProtoValu…
…ePtr 1) In EntryKernel sync_pb::EntitySpecifics and sync_pb::AttachmentMetadata fields are wrapped with ProtoValuePtr smart pointers that implement COW. This allows implicit sharing of the data when entire instances of EntryKernel are copied. 2) Mutable access to those fields (mutable_ref methods) is removed from EntryKernel and copy methods are added to allow sharing of data between the server and the client fields of EntryKernel. 3) The code that loads EntryKernel fields from Sync DB is modified to perform binary comparison of the serialized data and share the values between the server and the client fields of EntryKernel. 4) In MutableEntry and ModelNeutralMutableEntry, the following Put* methods are modified to perform an additional check for the sharing opportunity between the assigned field and another field that is likely to be source for the value being assigned and therefore have an identical value: - PutServerSpecifics checks against SPECIFICS - PutSpecifics checks agains against SERVER_SPECIFICS - PutBaseServerSpecifics checks against SERVER_SPECIFICS - PutServerAttachmentMetadata checks against ATTACHMENT_METADATA - PutAttachmentMetadata checks against SERVER_ATTACHMENT_METADATA BUG=499443 Review URL: https://codereview.chromium.org/1191013006 Cr-Commit-Position: refs/heads/master@{#335419}
- Loading branch information
stanisc
authored and
Commit bot
committed
Jun 20, 2015
1 parent
af86c2b
commit 5f55952
Showing
8 changed files
with
251 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.