summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine
Commit message (Collapse)AuthorAgeFilesLines
* Merge 113550 - [Sync] Special case nigori when calculating commit id's.zea@chromium.org2011-12-221-1/+5
| | | | | | | | | | | | | | | | | We special case the nigori node because even though it is considered an "encrypted type", not all nigori node changes require valid encryption (ex: sync_tabs). BUG=106619 TEST=none. Review URL: http://codereview.chromium.org/8856007 TBR=zea@chromium.org Review URL: http://codereview.chromium.org/9025021 git-svn-id: svn://svn.chromium.org/chrome/branches/963/src@115563 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 115248 - [Sync] Add nigori node conflict resolution.zea@chromium.org2011-12-226-61/+248
| | | | | | | | | | | | | | | | | | | | | We merge the set of encryption keys, types, and non-encryption data in the conflict resolver. If the server's keys are undecryptable we preserve them until the user provides the passphrase, at which point we store back the merged set of encryption keys. This way, once everything is resolved, the default passphrase will be the one that was committed first, and all clients will have all sets of encryption keys. BUG=105615 TEST=sync_unit_tests. Manually attempt to set two different passphrases and encrypted types on synced machines. Ensure everything works. Review URL: http://codereview.chromium.org/8917031 TBR=zea@chromium.org Review URL: http://codereview.chromium.org/9021048 git-svn-id: svn://svn.chromium.org/chrome/branches/963/src@115481 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 115472 - Merge 115248 - [Sync] Add nigori node conflict resolution.zea@chromium.org2011-12-226-248/+61
| | | | | | | | | | | | | | | | | | | | | | | | We merge the set of encryption keys, types, and non-encryption data in the conflict resolver. If the server's keys are undecryptable we preserve them until the user provides the passphrase, at which point we store back the merged set of encryption keys. This way, once everything is resolved, the default passphrase will be the one that was committed first, and all clients will have all sets of encryption keys. BUG=105615 TEST=sync_unit_tests. Manually attempt to set two different passphrases and encrypted types on synced machines. Ensure everything works. Review URL: http://codereview.chromium.org/8917031 TBR=zea@chromium.org Review URL: http://codereview.chromium.org/9017039 TBR=zea@chromium.org Review URL: http://codereview.chromium.org/9021047 git-svn-id: svn://svn.chromium.org/chrome/branches/963/src@115477 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 115248 - [Sync] Add nigori node conflict resolution.zea@chromium.org2011-12-226-61/+248
| | | | | | | | | | | | | | | | | | | | | We merge the set of encryption keys, types, and non-encryption data in the conflict resolver. If the server's keys are undecryptable we preserve them until the user provides the passphrase, at which point we store back the merged set of encryption keys. This way, once everything is resolved, the default passphrase will be the one that was committed first, and all clients will have all sets of encryption keys. BUG=105615 TEST=sync_unit_tests. Manually attempt to set two different passphrases and encrypted types on synced machines. Ensure everything works. Review URL: http://codereview.chromium.org/8917031 TBR=zea@chromium.org Review URL: http://codereview.chromium.org/9017039 git-svn-id: svn://svn.chromium.org/chrome/branches/963/src@115472 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 113112 - Revert 113103 - Changes the visibility of the 'mobile' node ↵sky@chromium.org2011-12-061-2/+6
| | | | | | | | | | | | | | | | | based on whether there is a node on the sync side. BUG=102714 TEST=none Review URL: http://codereview.chromium.org/8786006 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/8819008 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/8818004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113117 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 113103 - Changes the visibility of the 'mobile' node based on whether ↵sky@chromium.org2011-12-061-6/+2
| | | | | | | | | | | | | | there is a node on the sync side. BUG=102714 TEST=none Review URL: http://codereview.chromium.org/8786006 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/8819008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113112 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the visibility of the 'mobile' node based on whether there is a node ↵sky@chromium.org2011-12-061-2/+6
| | | | | | | | | | | on the sync side. BUG=102714 TEST=none Review URL: http://codereview.chromium.org/8786006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113103 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add framework for avoid posting tasks on threads with no work to doakalin@chromium.org2011-12-0624-39/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand. Use that to figure out which worker threads to post work on (instead of posting on all of them). Implement GetGroupsToChange() for each ModelChangingSyncerCommand. Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession. Key unapplied updates index by type for ApplyUpdatesCommand. Make the abstract methods of ModelChangingSyncerCommand protected. Add HasCustomGroupsToChange() method to ModelChangingSyncerCommand and have all commands default to returning false to track down the perf regression introduced by the last couple of times this was landed (112178, 112815). BUG=97832 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112178 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112743 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112815 Review URL: http://codereview.chromium.org/8637006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113090 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 112815 - [Sync] Make syncer commands avoid posting tasks on threads ↵akalin@chromium.org2011-12-0324-417/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with no work to do Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand. Use that to figure out which worker threads to post work on (instead of posting on all of them). Implement GetGroupsToChange() for each ModelChangingSyncerCommand. Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession. Key unapplied updates index by type for ApplyUpdatesCommand. Make the abstract methods of ModelChangingSyncerCommand protected. This patch includes a speculative fix for the perf regression introduced by the last time this was landed (112178). BUG=97832 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112178 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112743 Review URL: http://codereview.chromium.org/8637006 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/8785015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112855 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Make syncer commands avoid posting tasks on threads with no work to doakalin@chromium.org2011-12-0224-39/+417
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand. Use that to figure out which worker threads to post work on (instead of posting on all of them). Implement GetGroupsToChange() for each ModelChangingSyncerCommand. Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession. Key unapplied updates index by type for ApplyUpdatesCommand. Make the abstract methods of ModelChangingSyncerCommand protected. This patch includes a speculative fix for the perf regression introduced by the last time this was landed (112178). BUG=97832 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112178 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112743 Review URL: http://codereview.chromium.org/8637006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112815 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 112743 - [Sync] Make syncer commands avoid posting tasks on threads ↵akalin@chromium.org2011-12-0224-410/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with no work to do Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand. Use that to figure out which worker threads to post work on (instead of posting on all of them). Implement GetGroupsToChange() for each ModelChangingSyncerCommand. Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession. Key unapplied updates index by type for ApplyUpdatesCommand. Make the abstract methods of ModelChangingSyncerCommand protected. This patch includes a speculative fix for the perf regression introduced by the last time this was landed (112178). BUG=97832 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112178 Review URL: http://codereview.chromium.org/8637006 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/8771044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112759 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Make syncer commands avoid posting tasks on threads with no work to doakalin@chromium.org2011-12-0224-39/+410
| | | | | | | | | | | | | | | | | | | | | | | | | Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand. Use that to figure out which worker threads to post work on (instead of posting on all of them). Implement GetGroupsToChange() for each ModelChangingSyncerCommand. Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession. Key unapplied updates index by type for ApplyUpdatesCommand. Make the abstract methods of ModelChangingSyncerCommand protected. This patch includes a speculative fix for the perf regression introduced by the last time this was landed (112178). BUG=97832 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112178 Review URL: http://codereview.chromium.org/8637006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112743 0039d316-1c4b-4281-b951-d872f2087c98
* BookmarkModel cleanup. synced_node is now mobile_node and I'm nukingsky@chromium.org2011-12-011-6/+2
| | | | | | | | | | | | IsVisible as it's no longer needed. This cl resulted in a ton of changes, the majority are renames though. BUG=102714 TEST=covered by tests Review URL: http://codereview.chromium.org/8759017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112558 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 112178 - [Sync] Make syncer commands avoid posting tasks on threads ↵akalin@chromium.org2011-11-3024-406/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | with no work to do Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand. Use that to figure out which worker threads to post work on (instead of posting on all of them). Implement GetGroupsToChange() for each ModelChangingSyncerCommand. Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession. Key unapplied updates index by type for ApplyUpdatesCommand. Make the abstract methods of ModelChangingSyncerCommand protected. BUG=97832 TEST= Review URL: http://codereview.chromium.org/8637006 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/8758006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112318 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Make syncer commands avoid posting tasks on threads with no work to doakalin@chromium.org2011-11-3024-39/+406
| | | | | | | | | | | | | | | | | | | | | | Add abstract GetGroupsToChange() method to ModelChangingSyncerCommand. Use that to figure out which worker threads to post work on (instead of posting on all of them). Implement GetGroupsToChange() for each ModelChangingSyncerCommand. Add GetEnabledGroups() and GetEnabledGroupsWithConflicts() functions to SyncSession. Key unapplied updates index by type for ApplyUpdatesCommand. Make the abstract methods of ModelChangingSyncerCommand protected. BUG=97832 TEST= Review URL: http://codereview.chromium.org/8637006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112178 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Convert VLOGs to DVLOGsakalin@chromium.org2011-11-2918-188/+188
| | | | | | | | | | BUG=101424 TEST= Review URL: http://codereview.chromium.org/8726020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112032 0039d316-1c4b-4281-b951-d872f2087c98
* This is the second and final patch of changes for implementing the per ↵lipalani@chromium.org2011-11-244-29/+114
| | | | | | | | | | | | | | datatype throttling feature. Includes the tests. This consumes the throttled datatypes set in the context and uses that to filter the unsynced handles that we use for committing. BUG=104819 TEST=unit_tests.exe, sync_unit_tests.exe, sync_integration_tests.exe, manual test cases Review URL: http://codereview.chromium.org/8631021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111464 0039d316-1c4b-4281-b951-d872f2087c98
* Parse and Store the throttled datatypes and the unthrottling time, which is ↵lipalani@chromium.org2011-11-233-3/+98
| | | | | | | | | | | | | | obtained from the server response, in the sync_session_context. This is the first patch for per datatype throttling feature. The next patch would consume this data to decide what items to commit. BUG=104819 TEST=sync_unit_tests.exe, sync_integration_tests.exe, unit_tests.exe Review URL: http://codereview.chromium.org/8595023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111408 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Made some sync session member functions constakalin@chromium.org2011-11-2324-306/+275
| | | | | | | | | | | | | | | | | | | | In particular, split SyncSession::status_controller() into status_controller() and mutable_status_controller(). Also remove some dead code. Propagate const methods throughout sync code. This is in preparation for an upcoming change that makes ModelChangingSyncerCommand post on only the threads it needs to. BUG=97832 TEST= Review URL: http://codereview.chromium.org/8638001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111329 0039d316-1c4b-4281-b951-d872f2087c98
* Event tracing for sync eventsrlarocque@chromium.org2011-11-232-19/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a "sync" trace event category that traces the following events: - model association time - time spent in each step of the syncer state machine - transactions Also included is a "sync_lock_contention" category that tracks the time spent acquiring the sync lock. This information would normally clutter up the logs, but it is useful information when we suspect lock contention is an issue. To trace model association tracing, I needed to have a set of strings with application lifetime representing each model type. I have changed the return type of ModelTypeToString from std::string to const char* to meet this need. In the interest of avoiding duplicate functionality, this change also removes other mechanisms for tracing transaction time. In particular, some of the log messages around acquiring and releasing transactions have been removed. BUG=104353 TEST=Run with '--trace-startup=sync,sync_lock_contention', open resulting chrometrace.log in about:tracing. Review URL: http://codereview.chromium.org/8573011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111265 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Make ModelSafeWorker a true interfaceakalin@chromium.org2011-11-2213-188/+142
| | | | | | | | | | | | | | | | | | | | Make PassiveModelWorker class. Make FakeModelWorker class and make tests use it. Also make some tests use realistic groups instead of shunting everything to GROUP_PASSIVE. Rename MockModelSafeWorkerRegistrar to FakeModelSafeWorkerRegistrar. This will make it easier to test an upcoming change that makes ModelChangingSyncerCommand post on only the threads it needs to. BUG=97832 TEST= Review URL: http://codereview.chromium.org/8625005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111131 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to chrome/browser/sync/.avi@chromium.org2011-11-2117-31/+52
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8470005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110976 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Replace uses of ObserverListThreadSafe with WeakHandlesakalin@chromium.org2011-11-192-0/+5
| | | | | | | | | | | | | | | | | ObserverListThreadSafe was overkill since there was only two threads involved, and only one observer. Add MessageLoop member variables to various test classes that need it (ObserverListThreadSafe had a hack that made it unnecessary before.) BUG=103732 TEST=Start with a clean profile and set up sync. about:profiler shouldn't show ObserverListThreadSafe::Notify calls with sync threads anymore. Review URL: http://codereview.chromium.org/8586014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110836 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 110555 - sync: Remove ModelNeutralExecuteImpl()rlarocque@chromium.org2011-11-175-4/+28
| | | | | | | | | | | | | | | | | | ProcessUpdatesCommand was the only child of ModelChangingSyncerCommand to override this function. Since it is special, let's just treat it specially in syncer.cc rather than modifying ModelChangingSyncerCommand to suit its needs. BUG=36594 TEST= Review URL: http://codereview.chromium.org/8510079 TBR=rlarocque@chromium.org Review URL: http://codereview.chromium.org/8586042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110572 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove ModelNeutralExecuteImpl()rlarocque@chromium.org2011-11-175-28/+4
| | | | | | | | | | | | | | | ProcessUpdatesCommand was the only child of ModelChangingSyncerCommand to override this function. Since it is special, let's just treat it specially in syncer.cc rather than modifying ModelChangingSyncerCommand to suit its needs. BUG=36594 TEST= Review URL: http://codereview.chromium.org/8510079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110555 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add histograms for simple conflict resolution.zea@chromium.org2011-11-171-3/+28
| | | | | | | | | | | | | This gives us some insight into how often different conflict resolutions are happening. BUG=none TEST=none Review URL: http://codereview.chromium.org/8587006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110541 0039d316-1c4b-4281-b951-d872f2087c98
* Revert the revert. This change was not the cause of the failures, so relanding.zea@chromium.org2011-11-172-0/+7
| | | | | | | | | | | | | | | | | | | | | Revert 110490 - Revert "[Sync] Add version info to about:sync" This reverts r110456. These tests have been failing on the Mac10.6 Sync builder since this was landed: ManyClientBookmarksSyncTest.Sanity ManyClientPasswordsSyncTest.Sanity ManyClientPreferencesSyncTest.Sanity BUG= TEST= Review URL: http://codereview.chromium.org/8590030 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/8585037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110532 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "[Sync] Add version info to about:sync"avi@chromium.org2011-11-172-7/+0
| | | | | | | | | | | | | | | | This reverts r110456. These tests have been failing on the Mac10.6 Sync builder since this was landed: ManyClientBookmarksSyncTest.Sanity ManyClientPasswordsSyncTest.Sanity ManyClientPreferencesSyncTest.Sanity BUG= TEST= Review URL: http://codereview.chromium.org/8590030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110490 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add version info to about:synczea@chromium.org2011-11-172-0/+7
| | | | | | | | | | | | Version is in format <Browser Name> <Version> (<OS>) <Channel/Modifier info> BUG=97158 TEST=verify version info is in about:sync Review URL: http://codereview.chromium.org/8587017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110456 0039d316-1c4b-4281-b951-d872f2087c98
* sync: remove IncrementErrorCount from ServerConnectionManager.tim@chromium.org2011-11-172-36/+2
| | | | | | | | | | | | | | | It's not used for a real purpose anymore, and it was causing the SCM to have multiple active_connection_ objects in certain cases, which is bad. This is mostly covered by SyncAPIServerConnectionManagerTest BUG=101639 TEST=On a debug build, no DCHECKs if the server is unreachable on sync startup. Review URL: http://codereview.chromium.org/8590005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110443 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded forward declarations in chrome/browser/sync.thestig@chromium.org2011-11-1513-47/+7
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8537003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110141 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Use a single transaction in ProcessUpdates rather than one per entry. tim@chromium.org2011-11-152-11/+13
| | | | | | | | | | BUG=104203 TEST=compare 'Entries' count on about:sync to number of SyncThread>SyncThread Notify tasks in tracker2/profiler. The entries count should be much smaller. Review URL: http://codereview.chromium.org/8533024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110138 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Remove logging/checks for case where server and local entries mismatch.zea@chromium.org2011-11-123-90/+0
| | | | | | | | | | | | | | We will now reliably hit this code due to the server changing the MTIME of any committed item. As a result of this, and because the check and log is expensive, it's better to just remove them altogether. BUG=103838 TEST=none Review URL: http://codereview.chromium.org/8526018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109761 0039d316-1c4b-4281-b951-d872f2087c98
* net: Move the last two Escape() functions into the net namespace.tfarina@chromium.org2011-11-091-1/+1
| | | | | | | | | | | BUG=64263 TEST=None R=willchan@chromium.org Review URL: http://codereview.chromium.org/8507011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109298 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Don't commit items we know are not ready.zea@chromium.org2011-11-073-120/+209
| | | | | | | | | | | | | Items whose version does not match the server version or who require (re)encryption are filtered out from the set of commit id's. BUG=100660 TEST=sync_integration_tests, sync_unit_tests Review URL: http://codereview.chromium.org/8400035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108893 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Make GetFirstChildId return a flag indicating successakalin@chromium.org2011-10-284-19/+41
| | | | | | | | | | | | | | Propagate that flag up a few levels and add CHECKs. Since the old code crashed, CHECKing is no worse. Rename some functions to add *ForTest suffixes. BUG=100907 TEST= Review URL: http://codereview.chromium.org/8402014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107686 0039d316-1c4b-4281-b951-d872f2087c98
* This is the first patch in a series of patches. This patch introduces the ↵lipalani@chromium.org2011-10-274-8/+28
| | | | | | | | | | | | | | | unrecoverable error info class which is plumbed up all ModelSafeWorker subclasses. The subclasses of ModelChangingSyncer command would be converted to return an unrecoverable error info in another CL. BUG=100374 TEST= Review URL: http://codereview.chromium.org/8366030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107535 0039d316-1c4b-4281-b951-d872f2087c98
* Send important client side event information to the server. We create a ↵lipalani@chromium.org2011-10-156-3/+43
| | | | | | | | | | | | | | | | | | | | class called DebugInfoEventListener which implements 2 interfaces. one being the syncmanager::observer to observe events from syncmanager. The other being DebugInfoGetter so that syncer can call this class to give the debug information in protobuf format. The implementation of this class uses a queue. And it limits the number of events to 6. if more than 6 events are in the queue we delete the oldest event. Also we send this information to the server only once per sync cycle during the first getudpdates command. also includes the unit test. TBR=cmp@chromium.org for the SI relaxation. BUG=100058 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105667 Review URL: http://codereview.chromium.org/8189003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105683 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 105667 - Send important client side event information to the server. ↵lipalani@chromium.org2011-10-156-45/+5
| | | | | | | | | | | | | | | | | | | We create a class called DebugInfoEventListener which implements 2 interfaces. one being the syncmanager::observer to observe events from syncmanager. The other being DebugInfoGetter so that syncer can call this class to give the debug information in protobuf format. The implementation of this class uses a queue. And it limits the number of events to 6. if more than 6 events are in the queue we delete the oldest event. Also we send this information to the server only once per sync cycle during the first getudpdates command. also includes the unit test. BUG=100058 TEST= Review URL: http://codereview.chromium.org/8189003 TBR=lipalani@chromium.org Review URL: http://codereview.chromium.org/8313002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105680 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some check statements to NOTREACHED to be on parity with the ↵lipalani@chromium.org2011-10-152-2/+8
| | | | | | | | | | | codebase that was before r104835 went in. BUG=100374, 100398 TEST= Review URL: http://codereview.chromium.org/8298016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105670 0039d316-1c4b-4281-b951-d872f2087c98
* Send important client side event information to the server. We create a ↵lipalani@chromium.org2011-10-156-5/+45
| | | | | | | | | | | | | | | | class called DebugInfoEventListener which implements 2 interfaces. one being the syncmanager::observer to observe events from syncmanager. The other being DebugInfoGetter so that syncer can call this class to give the debug information in protobuf format. The implementation of this class uses a queue. And it limits the number of events to 6. if more than 6 events are in the queue we delete the oldest event. Also we send this information to the server only once per sync cycle during the first getudpdates command. also includes the unit test. BUG=100058 TEST= Review URL: http://codereview.chromium.org/8189003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105667 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 104831 - [Sync] Change default session commit delay to 5s.zea@chromium.org2011-10-111-4/+1
| | | | | | | | | | | | | | The default 10s delay was causing problems in the sync integration tests. BUG=none TEST=none Review URL: http://codereview.chromium.org/8222026 TBR=zea@chromium.org Review URL: http://codereview.chromium.org/8223020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104845 0039d316-1c4b-4281-b951-d872f2087c98
* Changed the CHECK condition in PutPredecessor to return false. The upper ↵lipalani@chromium.org2011-10-113-5/+3
| | | | | | | | | | | | layers handle that by either doing a CHECK or doing an unrecoverable error. BUG=91281 TEST= Review URL: http://codereview.chromium.org/8206020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104833 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Change default session commit delay to 5s.zea@chromium.org2011-10-111-1/+4
| | | | | | | | | | | The default 10s delay was causing problems in the sync integration tests. BUG=none TEST=none Review URL: http://codereview.chromium.org/8222026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104831 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Avoid posting work on threads with no active data typesakalin@chromium.org2011-10-082-4/+23
| | | | | | | | | | | | | | | | | | | | | In ModelChangingSyncerCommand, get a list of active groups from the routing info and use that to skip workers which don't correspond to an active group. In particular, this skips posting on the FILE thread, since its data type (extension settings) isn't on yet. Remove obsolete TODO. Add integration test for enabling data types. BUG=97832 TEST= Review URL: http://codereview.chromium.org/8036030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104661 0039d316-1c4b-4281-b951-d872f2087c98
* sync: stop syncing before stopping change processors.tim@chromium.org2011-10-073-30/+68
| | | | | | | | | | | | Fixes two races - syncing happening just after the processors are shut down, and a race where the sync manager doesn't yet exist but is about to be created, and we don't shut it down properly. BUG=53802,97981 TEST=SyncBackendHostTest, ProfileSyncServiceTests, SyncapiTest, SyncSchedulerTest Review URL: http://codereview.chromium.org/8044014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104423 0039d316-1c4b-4281-b951-d872f2087c98
* sync: use base::Closure instead of ModeChangeCallbacktim@chromium.org2011-10-043-51/+58
| | | | | | | | | BUG= TEST=SyncSchedulerTest Review URL: http://codereview.chromium.org/8120005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103824 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] use base::Time in syncakalin@chromium.org2011-09-227-73/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Make EntryKernel/Entry/BaseNode use base::Time instead of int64s. Add sync/util/time.h, with utility functions to manage the sync proto time format. Store times on disk in proto format instead of the local system. This requires a database version bump (to 77). Update SessionChangeProcessor/SessionModelAssociator to use base::Time, too. Remove hackish Now() function. Remove ZeroFields() function, and instead zero-initialize in EntryKernel::EntryKernel() directly. BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102184 Review URL: http://codereview.chromium.org/7981006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102218 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 102184 - [Sync] use base::Time in syncakalin@chromium.org2011-09-217-36/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make EntryKernel/Entry/BaseNode use base::Time instead of int64s. Add sync/util/time.h, with utility functions to manage the sync proto time format. Store times on disk in proto format instead of the local system. This requires a database version bump (to 77). Update SessionChangeProcessor/SessionModelAssociator to use base::Time, too. Remove hackish Now() function. Remove ZeroFields() function, and instead zero-initialize in EntryKernel::EntryKernel() directly. BUG= TEST= Review URL: http://codereview.chromium.org/7981006 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/7977034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102186 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] use base::Time in syncakalin@chromium.org2011-09-217-73/+36
| | | | | | | | | | | | | | | | | | | | | | | | Make EntryKernel/Entry/BaseNode use base::Time instead of int64s. Add sync/util/time.h, with utility functions to manage the sync proto time format. Store times on disk in proto format instead of the local system. This requires a database version bump (to 77). Update SessionChangeProcessor/SessionModelAssociator to use base::Time, too. Remove hackish Now() function. Remove ZeroFields() function, and instead zero-initialize in EntryKernel::EntryKernel() directly. BUG= TEST= Review URL: http://codereview.chromium.org/7981006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102184 0039d316-1c4b-4281-b951-d872f2087c98