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

Unified Diff: sync/engine/sync_session_job.cc

Issue 13422003: sync: Refactor job ownership in SyncScheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix subtle problem with nudge-in-backoff handling 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 side-by-side diff with in-line comments
Download patch
Index: sync/engine/sync_session_job.cc
diff --git a/sync/engine/sync_session_job.cc b/sync/engine/sync_session_job.cc
index 0195f80ce6d5f04e19aeef8a1a648e6f108c7a9c..234b4c1127c36a418b64269647461ad0ee595546 100644
--- a/sync/engine/sync_session_job.cc
+++ b/sync/engine/sync_session_job.cc
@@ -18,8 +18,7 @@ SyncSessionJob::SyncSessionJob(
: purpose_(purpose),
source_info_(source_info),
scheduled_start_(start),
- config_params_(config_params),
- finished_(NOT_FINISHED) {
+ config_params_(config_params) {
}
#define ENUM_CASE(x) case x: return #x; break;
@@ -36,15 +35,6 @@ const char* SyncSessionJob::GetPurposeString(SyncSessionJob::Purpose purpose) {
#undef ENUM_CASE
bool SyncSessionJob::Finish(bool early_exit, sessions::SyncSession* session) {
- DCHECK_EQ(finished_, NOT_FINISHED);
- // Did we run through all SyncerSteps from start_step() to end_step()
- // until the SyncSession returned !HasMoreToSync()?
- // Note: if not, it's possible the scheduler hasn't started with
- // SyncShare yet, it's possible there is still more to sync in the session,
- // and it's also possible the job quit part way through due to a premature
- // exit condition (such as shutdown).
- finished_ = early_exit ? EARLY_EXIT : FINISHED;
-
if (early_exit)
return false;
@@ -75,12 +65,6 @@ bool SyncSessionJob::Finish(bool early_exit, sessions::SyncSession* session) {
return true;
}
-scoped_ptr<SyncSessionJob> SyncSessionJob::Clone() const {
- return scoped_ptr<SyncSessionJob>(new SyncSessionJob(
- purpose_, scheduled_start_, source_info_,
- config_params_));
-}
-
void SyncSessionJob::CoalesceSources(const sessions::SyncSourceInfo& source) {
CoalesceStates(source.types, &source_info_.types);
source_info_.updates_source = source.updates_source;

Powered by Google App Engine
This is Rietveld 408576698