summaryrefslogtreecommitdiffstats
path: root/sync/protocol
Commit message (Collapse)AuthorAgeFilesLines
* [Sync] Move ModelType and related classes to 'syncer' namespaceakalin@chromium.org2012-07-032-3/+3
| | | | | | | | | | | | | | Previously they were in 'syncer::syncable'. Also remove aliases to those classes from 'syncable'. BUG=128060 TEST= TBR=pkasting@chromium.org,jhawkins@chromium.org, Review URL: https://chromiumcodereview.appspot.com/10696087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145399 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move model_type* from syncable/ to base/akalin@chromium.org2012-07-033-3/+3
| | | | | | | | | | | | | | | | | | | Also move enum_set* to base/. This is the first step in moving ModelType et al. to the syncer namespace (from syncer::syncable). Move PurgeStalePayload() back to sync_session.cc. Move ModelTypePayloadMapFromRoutingInfo() to model_safe_worker.* and rename it to ModelSafeRoutingInfoToPayloadMap(). BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10690071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145236 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename csync namespace to syncerakalin@chromium.org2012-06-288-16/+16
| | | | | | | | | | | | | | | Everyone was confused by 'csync'. 'syncer' seems more understandable. (Note that we can't use the 'sync' namespace since sync() is a function from unistd.h.) BUG=10662035 TEST= TBR=jhawkins@chromium.org,pkasting@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144820 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Refactor session tracking rlarocque@chromium.org2012-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This change refactors the related structs ErrorCounters, SyncerStatus, and SyncCycleControlParameters. Their values have all been merged into AllModelTypeState, which has been renamed to ModelNeutralState. All the functions which depend on this data have been updated to use the new struct. This change also removes the DirtyOnWrite template class, the is_dirty flag, and the SyncerCommand logic to send change events if it detects a change in the syncer's status. The changes are so frequent and predictable that it's easier to just send the snapshots manually after any major syncer steps. Finally, this change removes the 'invalid_store' status member, which was never set nor read outside of unit tests. BUG=132630 TEST= Review URL: https://chromiumcodereview.appspot.com/10636010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143675 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename browser_sync to csync in sync/akalin@chromium.org2012-06-218-15/+15
| | | | | | | | | | | | | | | Update all references from chrome. Leave possibly-extraneous csync:: qualifications in sync/ for now. (This will be cleaned up once everything in sync/ is in csync::.) BUG=128060 TEST= TBR=jhawkins@chromium.org Review URL: https://chromiumcodereview.appspot.com/10600002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143449 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove ClearUserData command.tim@chromium.org2012-06-204-14/+14
| | | | | | | | | BUG=131336 TEST=none Review URL: https://chromiumcodereview.appspot.com/10584019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143088 0039d316-1c4b-4281-b951-d872f2087c98
* sync: create internal_api/public to house sync/ files needed by ↵tim@chromium.org2012-06-073-3/+3
| | | | | | | | | | | | | | | | | chrome/browser/sync. Note on sync.gyp changes and .cc file moves: most files in /public have .h and their .cc side by side, as they are simple implementations. In some cases like model_type.cc (and others in a follow up patch, like sync_manager.cc) have only their header exposed in /public while the impl stays behind, because it needs to include things from within sync/, and /public has a strict include DEPS policy. This is in accordance with other /public folders (like content/). Cleans up DEPS files in sync + c/b/sync. Adds sync/{engine, sessions, syncable} to public/. There is more to come (moving things in internal_api/ into public). Not touching /notifier as that is in flux at the moment. BUG=131130 TEST= Review URL: https://chromiumcodereview.appspot.com/10532019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141038 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Cleanup all tab sync enabling logic now that its on by default.zea@chromium.org2012-05-302-2/+2
| | | | | | | | | | BUG=none TEST= Review URL: https://chromiumcodereview.appspot.com/10443046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139462 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Replace TalkMediator*/MediatorThread* with PushClientakalin@chromium.org2012-05-171-23/+0
| | | | | | | | | | | | | | | Streamline methods of PushClient and its Observer subclass. Remove sync/protocol/service_constants.h and consolidate use of each constant in one place. Remove duplicate constant in cloud print code. BUG=76764 TEST= TBR=estade@chromium.org Review URL: https://chromiumcodereview.appspot.com/10398051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137615 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move PageTransitions enums to SyncEnumszea@chromium.org2012-05-165-50/+54
| | | | | | | | | | BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10382183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137309 0039d316-1c4b-4281-b951-d872f2087c98
* These bits were supposed to be included in 135775 but I forgot to save them :(pkasting@chromium.org2012-05-081-1/+2
| | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135867 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the "autogenerate keyword" bit on TemplateURL.pkasting@chromium.org2012-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a large change because a number of other significant pieces were either inherently tied to the above change, or too difficult to separate from it: * Because autogeneration was really only ever supposed to be used for the prepopulated Google entry, replace it with a system that auto-regenerates keywords for TemplateURLs that (a) use {google:baseURL} and (b) have a keyword that's currently "google.<TLD>" whenever the base URL changes. This means that users who manually create such TemplateURLs will automatically get the benefit of "autogenerated" keywords. * Pass information to the KeywordTable as bare TemplateURLData objects instead of TemplateURLs, now that the latter are not needed to perform keyword generation. * Remove the "autogenerate_keyword" column from the KeywordTable. This also takes the opportunity to remove the already-dead "logo_id" column (which I previously asked msw to leave in in order to only have to write the migration code once). This in turn requires adding version numbers to a lot of functions so they know which column set to use, as well as writing migration code to manually generate keywords for previously-autogenerated entries. * Migrate the "autogenerate_keyword" bit in data from prefs and sync as well. For sync this requires a variety of followon changes to send back ACTION_UPDATEs for migrated TemplateURLs and coalesce multiple SyncChanges to the same GUID. * Move various bits of TemplateURLService::GenerateKeyword() that were only used for the "autodetected on a webpage" case to the specific code for that case, in order to make GenerateKeyword() incapable of failing. This is important for the next item. * Remove the possibility for keywords to simply be empty. All TemplateURLs should now have a keyword, whether they were previously marked as "autogenerated" or not. While the UI already tried to guarantee this, the TemplateURL class itself and various pieces of TemplateURLService did not, or didn't deal correctly with exceptions. Enforcing this makes it much easier to reason about keywords and is important for the next item. * Guarantee that all keywords are unique, with one exception noted below. This allows callers to reliably refer to TemplateURLs by keyword; a future change will make AutocompleteMatch do precisely this. It also prevents weird edge cases in the UI and sync. * Exception: explicitly allow extension keywords to overlap with each other and with one non-extension TemplateURL. Previously, the behavior was somewhat random and buggy when we added and removed extensions that defined keywords, especially if we also tried to add/edit/remove keywords from the settings UI. We now define an explicit precedence order: non-replaceable TemplateURL > extension-provided TemplateURLs > replaceable TemplateURL; within the extensions section, the most recently-added extension wins. As we add and remove keywords, the current "TemplateURL for keyword" is always kept up-to-date according to this precedence order (so e.g. removing a later extension will "expose" an earlier one). BUG=none TEST=Adding extensions that specify omnibox keywords which conflict with local keywords should result in predictable behavior as described above; removing the extensions should restore the prior behavior. Review URL: https://chromiumcodereview.appspot.com/10381016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135775 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add support for automatic enabling of syncing tab favicons.zea@chromium.org2012-04-272-0/+4
| | | | | | | | | | | | | | | We add the sync_tab_favicons field to the nigori node and add support for automatically enabling the feature when we receive a new nigori node. Once we do enable the feature, the browser will only start writing favicons after the next restart. BUG=92728 TEST=using python testserver to enable sync tab favicons, then restarting. Review URL: http://codereview.chromium.org/10235013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134184 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add per-navigation timestamps/unique ids to tab sync.zea@chromium.org2012-04-252-2/+8
| | | | | | | | | | | | | | | | | | | | | | | A navigation's timestamps are updated only if the navigation is new or if the user recently moved back/foward to the navigation entry. Otherwise, we preserve old timestamps. To do this, we switch to using SyncedTabNavigations, which also contains the unique id of the navigation (pulled from NavigationEntry) and the timestamp of the navgation, and SyncedSessionTab (which we have to use in order to support SyncedTabNavigations). Lastly, the protos have been updated to include unique_id/timestamp per navigation, remove some obsolete fields that were unimportant, and add comments about what transitions mean and when they're set. BUG=98892 TEST=unit_tests, manually inspecting timestamps in sync node browser. Review URL: http://codereview.chromium.org/10125002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133942 0039d316-1c4b-4281-b951-d872f2087c98
* Augment the client debug info with the cause for nudges.lipalani@chromium.org2012-04-181-0/+8
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/9956038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132713 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add support for syncing tab favicons.zea@chromium.org2012-04-134-0/+31
| | | | | | | | | | | | | | | | This functionality is currently behind a flag. We only support writing a new favicon when the tab's current url changes. This avoids possible issues due to website-controlled favicons. On the receiving end, we use the historydb's AddPageNoVisitForBookmark functionality to locally load the favicon without needing history visits. BUG=92728 TEST=manual inspection with --sync-tab-favicons Review URL: http://codereview.chromium.org/9924028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132139 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Fix reassociation when tab nodes have been only partially removed.zea@chromium.org2012-04-042-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | We would reassociate under the assumption that the number of free tab nodes matched the tags of the tab nodes (i.e. all tab nodes have a tag based on an id < the number of free tab nodes). When other clients delete stale sessions, they're not guaranteed to have all the nodes, and so may delete only a subset of the tab nodes. On the next reassociation, the previously-stale client will not properly track the pre-existing tab nodes. Specifically, the tab nodes it adds to its free pool may have tags based on ids larger than the free pool. To simplify this, we just delete all pre-existing tab nodes at association time. In addition, to lay the groundwork for future support of reassociation, we now also have a field in each tab node that provides the actual tab id used to create the client tag for that node. We can then eventually use that id to do tag based lookups instead of relying on size of our tab pool. BUG=121783 TEST=unit_tests Review URL: https://chromiumcodereview.appspot.com/9968114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130541 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Move the error Action enum to sync_enums.proto so that it can be ↵albertb@chromium.org2012-03-265-26/+24
| | | | | | | | | | | | | | | shared with the logging proto on the server-side. R=lipalani BUG=none TEST=none Review URL: http://codereview.chromium.org/9837021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128930 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Count and report reflected updatesrlarocque@chromium.org2012-03-244-34/+54
| | | | | | | | | | | | | | | | | | | Many of the updates a sync client receives are echoes of its own changes. This patch attempts to count how often these updates are received by comparing the version of downloaded updates against the local version. These counts are exposed locally through AllStatus/about:sync. We also upload this information to the server through the ClientDebugInfo mechanism. BUG=117565 TEST= Review URL: http://codereview.chromium.org/9702083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128659 0039d316-1c4b-4281-b951-d872f2087c98
* This would allow the developers to view the client/server sync traffic. In ↵lipalani@chromium.org2012-03-226-0/+339
| | | | | | | | | | | | | | | retail builds this code would be compiled out. To view the traffic you have to run chrome with the flag: --vmodule=traffic_logger=1. BUG=117615 TEST=git-cl try --email=foo Review URL: http://codereview.chromium.org/9663023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128277 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add ordinal_in_parent to SyncEntity/CommitResponse protobufakalin@chromium.org2012-03-221-6/+45
| | | | | | | | | | | | | | | This will replace position_in_parent, which has only 64 bytes of resolution. Add detailed comments explaining how ordinal_in_parent should be set. BUG=112201 TEST= Review URL: http://codereview.chromium.org/9369005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128159 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move 'sync' target to sync/akalin@chromium.org2012-03-1510-0/+1130
| | | | | | | | | | | | | | | | | | | | | | Also move related test files. Move WriteNode::UpdateEntryWithEncryption to nigori_util.h. Clean up defines and dependencies. In particular, get rid of SYNC_ENGINE_VERSION_STRING and hard-code the string in the single place it's used. Rename data_encryption.* to data_encryption_win.* and add a pragma for crypt32.lib. Clean up exit-time constructor warnings in sync{able,er}_unittest.cc. Remove some unused files. BUG=117585 TEST= TBR=jhawkins@chromium.org Review URL: https://chromiumcodereview.appspot.com/9699057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126872 0039d316-1c4b-4281-b951-d872f2087c98
* Add Phone/Tablet device types for syncing session from Android.yfriedman@chromium.org2012-03-141-0/+2
| | | | | | | | | | | | | | This is most of the scaffolding. The logic to choose between Tablet/Phone requires Java code which can't be upstreamed yet due to other dependencies. BUG= TEST= Review URL: http://codereview.chromium.org/9664008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126762 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Create new top-level sync/ directoryakalin@chromium.org2012-03-1021-0/+1639
Move sync .proto files to sync/protocol. Update all references. This begins the Great Sync Migration. BUG=117585,43624 TEST= Review URL: https://chromiumcodereview.appspot.com/9668028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125967 0039d316-1c4b-4281-b951-d872f2087c98