summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public/util/syncer_error.h
diff options
context:
space:
mode:
authordharani@google.com <dharani@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-29 23:26:15 +0000
committerdharani@google.com <dharani@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-29 23:26:15 +0000
commit592ca89ecd826dac82b837e5e2085d8c3cfbe22e (patch)
treeb0c0be4da773910112aee3b572045b87cf51b1f4 /sync/internal_api/public/util/syncer_error.h
parente0e8fac17ff416ac0ff4e5bd11ed086b9cf52a44 (diff)
downloadchromium_src-592ca89ecd826dac82b837e5e2085d8c3cfbe22e.zip
chromium_src-592ca89ecd826dac82b837e5e2085d8c3cfbe22e.tar.gz
chromium_src-592ca89ecd826dac82b837e5e2085d8c3cfbe22e.tar.bz2
Revert 164565 - sync: make scheduling logic and job ownership more obvious.
Revert Reason - see bug 158313 - inlines (and removes) SaveJob, to perform only the relevant "saving" bits where needed. As it turns out, most of it was only necessary for ShouldRunJob (which I'd like to rename, as it's destructive), and it's a lot easier to read what's happening and why. Note also removed TODO at SaveJob callsites. - inlines (and removes) InitOrCoalescePendingJob to perform only the relevant bits at each callsite. - pulls SyncSessionJob into a class, to handle basic responsibilities that need the job Purpose + session (like "Succeeded()" and "Finish") that were previously strewn about and partially copy/pasted in the scheduler. - meticulously transfers ownership (removes linked_ptr usage!) of jobs instead of making many implicit struct copies, as it resulted in non-obvious behavior. To do this, ownership is given to the scheduling mechanism (the MessageLoop for ScheduleSyncSessionJob, WaitInterval::timer for canary jobs), instead of jobs sitting around without knowing whether they're scheduled or not. There are a few cases where we can't actually "schedule" a job -- which wasn't even obvious from the old code, and other interesting revelations, like fact that we were actually pre-empt nudge canary jobs and "unscheduling" them in certain cases. - removes DoPendingJobIfPossible, since it is no longer needed for DoCanaryJob/Unthrottle cases, and make the behavior more explicit in the other cases (mode-switch and SCM error change), see TakePendingJobForCurrentMode. - removes the ability to create jobs as canary, since this wasn't needed and was adding complexity (see DoCanaryJob / GrantCanaryPrivilege). - removes retry_scheduled as it wasn't used anywhere - adds lots of comments. Also discovered that THROTTLED intervals seem to never fire a canary job with today's code (broken), config jobs are immune to per-data-type throttling, and the had_nudge allowance was defeated by extra IsBackingOff check in ScheduleNudgeImpl (see comment on review). BUG= Review URL: https://chromiumcodereview.appspot.com/10917234 TBR=tim@chromium.org Review URL: https://codereview.chromium.org/11347027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/util/syncer_error.h')
-rw-r--r--sync/internal_api/public/util/syncer_error.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/sync/internal_api/public/util/syncer_error.h b/sync/internal_api/public/util/syncer_error.h
index 478d888..ff184e3 100644
--- a/sync/internal_api/public/util/syncer_error.h
+++ b/sync/internal_api/public/util/syncer_error.h
@@ -28,8 +28,6 @@ enum SyncerError {
// Based on values returned by server. Most are defined in sync.proto.
SERVER_RETURN_INVALID_CREDENTIAL,
- FIRST_SERVER_RETURN_VALUE = SERVER_RETURN_INVALID_CREDENTIAL,
-
SERVER_RETURN_UNKNOWN_ERROR,
SERVER_RETURN_THROTTLED,
SERVER_RETURN_TRANSIENT_ERROR,