summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 11:16:52 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 11:16:52 +0000
commit54d468cb78c7c3846d07265ec8f9f0a1f41375df (patch)
treeba6989ce4a4bad7c31bfe8cb047a527debcf0f27 /sync
parentdf8c07449a2357a199cbd2949bbe4f6765768153 (diff)
downloadchromium_src-54d468cb78c7c3846d07265ec8f9f0a1f41375df.zip
chromium_src-54d468cb78c7c3846d07265ec8f9f0a1f41375df.tar.gz
chromium_src-54d468cb78c7c3846d07265ec8f9f0a1f41375df.tar.bz2
sync: Drop fully datatype throttled sync jobs rather than saving them.
This avoids a bug where we loop infinitely with calls to RestartWaiting with a zero WaitInterval length, which happens in part because we don't honour ThrottledDatatypeTracker unthrottle times and rely on seperate exponential backoff treatment. BUG=177659 Review URL: https://chromiumcodereview.appspot.com/12386012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r--sync/engine/sync_scheduler_impl.cc2
-rw-r--r--sync/engine/sync_scheduler_whitebox_unittest.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc
index 33e3fd5..c0014f3 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -429,7 +429,7 @@ SyncSchedulerImpl::JobProcessDecision SyncSchedulerImpl::DecideOnJob(
// Note that there may already be such an event if we're in a WaitInterval,
// so we can retry it then.
if (!requested_types.Empty() && throttled_types.HasAll(requested_types))
- return SAVE;
+ return DROP; // TODO(tim): Don't drop. http://crbug.com/177659
}
if (wait_interval_.get())
diff --git a/sync/engine/sync_scheduler_whitebox_unittest.cc b/sync/engine/sync_scheduler_whitebox_unittest.cc
index 383f17d..5a9d774 100644
--- a/sync/engine/sync_scheduler_whitebox_unittest.cc
+++ b/sync/engine/sync_scheduler_whitebox_unittest.cc
@@ -159,7 +159,8 @@ TEST_F(SyncSchedulerWhiteboxTest, SaveNudgeWhileTypeThrottled) {
ConfigurationParams(),
FROM_HERE);
SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job);
- EXPECT_EQ(decision, SyncSchedulerImpl::SAVE);
+ // TODO(tim): This shouldn't drop. Bug 177659.
+ EXPECT_EQ(decision, SyncSchedulerImpl::DROP);
}
TEST_F(SyncSchedulerWhiteboxTest, ContinueNudge) {