Make TrySyncSessionJob post task on sync thread
commite0428b159ce73ba356ee8eca65825c116c37e3be
authorpavely@chromium.org <pavely@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 16 Dec 2013 18:52:43 +0000 (16 18:52 +0000)
committerpavely@chromium.org <pavely@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 16 Dec 2013 18:52:43 +0000 (16 18:52 +0000)
treeec5415f2e5fd66cc91a5191f2a0d589946bed50e
parent3d0da818d4af9660123337036ef38e85a1c02636
Make TrySyncSessionJob post task on sync thread

Instead of calling sync cycle directly TrySyncSessionJob posts task on
sync thread.

Rescheduling exponential backoff timer had to be moved from TryCanaryJob
into TrySyncSessionJobImpl because it analyzes result of sync cycle.
The same with setting do_poll_after_credentials_updated_ after auth_error.

Tests needed additional PumpLoop because of additional Post call.

BUG=259913

Review URL: https://codereview.chromium.org/114123004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240949 0039d316-1c4b-4281-b951-d872f2087c98
sync/engine/sync_scheduler_impl.cc
sync/engine/sync_scheduler_impl.h
sync/engine/sync_scheduler_unittest.cc