| Index: chrome/browser/sync/engine/syncer_thread2.h
|
| diff --git a/chrome/browser/sync/engine/syncer_thread2.h b/chrome/browser/sync/engine/syncer_thread2.h
|
| index 3fbdd7f26d437f92a98009ef33933bf9ef1050a4..0705bdae0716c938ba69035a15854c4b60180286 100644
|
| --- a/chrome/browser/sync/engine/syncer_thread2.h
|
| +++ b/chrome/browser/sync/engine/syncer_thread2.h
|
| @@ -43,6 +43,15 @@ class SyncerThread : public sessions::SyncSession::Delegate,
|
| NORMAL_MODE,
|
| };
|
|
|
| + enum JobProcessDecision {
|
| + // Indicates we should continue with the current job.
|
| + CONTINUE,
|
| + // Indicates that we should save it to be processed later.
|
| + SAVE,
|
| + // Indicates we should drop this job.
|
| + DROP,
|
| + };
|
| +
|
| // Takes ownership of both |context| and |syncer|.
|
| SyncerThread(sessions::SyncSessionContext* context, Syncer* syncer);
|
| virtual ~SyncerThread();
|
| @@ -164,9 +173,17 @@ class SyncerThread : public sessions::SyncSession::Delegate,
|
| // Determines if it is legal to run a sync job for |purpose| at
|
| // |scheduled_start|. This checks current operational mode, backoff or
|
| // throttling, freshness (so we don't make redundant syncs), and connection.
|
| - bool ShouldRunJob(SyncSessionJobPurpose purpose,
|
| + JobProcessDecision ShouldRunJob(SyncSessionJobPurpose purpose,
|
| const base::TimeTicks& scheduled_start);
|
|
|
| + JobProcessDecision ShouldRunNudgeJob(const base::TimeTicks& scheduled_start);
|
| +
|
| + JobProcessDecision ShouldRunConfigureJob();
|
| +
|
| + JobProcessDecision ShouldRunJobDefaultImpl();
|
| +
|
| + bool ProcessJob(const SyncSessionJob& job);
|
| +
|
| // 'Impl' here refers to real implementation of public functions, running on
|
| // |thread_|.
|
| void StartImpl(Mode mode, linked_ptr<ModeChangeCallback> callback);
|
| @@ -176,7 +193,8 @@ class SyncerThread : public sessions::SyncSession::Delegate,
|
| const syncable::ModelTypePayloadMap& types_with_payloads,
|
| const tracked_objects::Location& nudge_location);
|
| void ScheduleConfigImpl(const ModelSafeRoutingInfo& routing_info,
|
| - const std::vector<ModelSafeWorker*>& workers);
|
| + const std::vector<ModelSafeWorker*>& workers,
|
| + const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source);
|
| void ScheduleClearUserDataImpl();
|
|
|
| // Returns true if the client is currently in exponential backoff.
|
| @@ -243,6 +261,9 @@ class SyncerThread : public sessions::SyncSession::Delegate,
|
|
|
| scoped_ptr<sessions::SyncSessionContext> session_context_;
|
|
|
| + // FIX THIS.
|
| + bool saved_nudge_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(SyncerThread);
|
| };
|
|
|
|
|