Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: sync/engine/sync_scheduler_impl.cc

Issue 12464005: Merge 185528 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_whitebox_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/engine/sync_scheduler_impl.h" 5 #include "sync/engine/sync_scheduler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 requested_types.Put(i->first); 431 requested_types.Put(i->first);
432 } 432 }
433 433
434 // If all types are throttled, do not CONTINUE. Today, we don't treat 434 // If all types are throttled, do not CONTINUE. Today, we don't treat
435 // a per-datatype "unthrottle" event as something that should force a 435 // a per-datatype "unthrottle" event as something that should force a
436 // canary job. For this reason, there's no good time to reschedule this job 436 // canary job. For this reason, there's no good time to reschedule this job
437 // to run -- we'll lazily wait for an independent event to trigger a sync. 437 // to run -- we'll lazily wait for an independent event to trigger a sync.
438 // Note that there may already be such an event if we're in a WaitInterval, 438 // Note that there may already be such an event if we're in a WaitInterval,
439 // so we can retry it then. 439 // so we can retry it then.
440 if (!requested_types.Empty() && throttled_types.HasAll(requested_types)) 440 if (!requested_types.Empty() && throttled_types.HasAll(requested_types))
441 return SAVE; 441 return DROP; // TODO(tim): Don't drop. http://crbug.com/177659
442 } 442 }
443 443
444 if (wait_interval_.get()) 444 if (wait_interval_.get())
445 return DecideWhileInWaitInterval(job); 445 return DecideWhileInWaitInterval(job);
446 446
447 if (mode_ == CONFIGURATION_MODE) { 447 if (mode_ == CONFIGURATION_MODE) {
448 if (job.purpose() == SyncSessionJob::NUDGE) 448 if (job.purpose() == SyncSessionJob::NUDGE)
449 return SAVE; // Running requires a mode switch. 449 return SAVE; // Running requires a mode switch.
450 else if (job.purpose() == SyncSessionJob::CONFIGURATION) 450 else if (job.purpose() == SyncSessionJob::CONFIGURATION)
451 return CONTINUE; 451 return CONTINUE;
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 1210
1211 #undef SDVLOG_LOC 1211 #undef SDVLOG_LOC
1212 1212
1213 #undef SDVLOG 1213 #undef SDVLOG
1214 1214
1215 #undef SLOG 1215 #undef SLOG
1216 1216
1217 #undef ENUM_CASE 1217 #undef ENUM_CASE
1218 1218
1219 } // namespace syncer 1219 } // namespace syncer
OLDNEW
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_whitebox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698