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

Unified Diff: components/sync/engine_impl/sync_scheduler_impl.cc

Issue 2106743002: WIP: Local sync only... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix after rebase. Created 4 years, 3 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: components/sync/engine_impl/sync_scheduler_impl.cc
diff --git a/components/sync/engine_impl/sync_scheduler_impl.cc b/components/sync/engine_impl/sync_scheduler_impl.cc
index c4362ac0c4d7648adedb63215347f934af907a7b..9616a1349fdf7c5500e6cf419acc580823006680 100644
--- a/components/sync/engine_impl/sync_scheduler_impl.cc
+++ b/components/sync/engine_impl/sync_scheduler_impl.cc
@@ -356,10 +356,11 @@ bool SyncSchedulerImpl::CanRunJobNow(JobPriority priority) {
return false;
}
- if (cycle_context_->connection_manager()->HasInvalidAuthToken()) {
- SDVLOG(1) << "Unable to run a job because we have no valid auth token.";
- return false;
- }
+ // ### Only if needed.
+ //if (cycle_context_->connection_manager()->HasInvalidAuthToken()) {
+ // SDVLOG(1) << "Unable to run a job because we have no valid auth token.";
+ // return false;
+ //}
return true;
}
@@ -520,13 +521,14 @@ void SyncSchedulerImpl::DoConfigurationSyncCycleJob(JobPriority priority) {
DCHECK(CalledOnValidThread());
DCHECK_EQ(mode_, CONFIGURATION_MODE);
DCHECK(pending_configure_params_ != NULL);
-
+ LOG(ERROR) << "@@@@@ SyncSchedulerImpl::DoConfigurationSyncCycleJob 1";
if (!CanRunJobNow(priority)) {
SDVLOG(2) << "Unable to run configure job right now.";
RunAndReset(&pending_configure_params_->retry_task);
return;
}
+ LOG(ERROR) << "@@@@@ SyncSchedulerImpl::DoConfigurationSyncCycleJob 2";
SDVLOG(2) << "Will run configure SyncShare with types "
<< ModelTypeSetToString(cycle_context_->GetEnabledTypes());
std::unique_ptr<SyncCycle> cycle(SyncCycle::Build(cycle_context_, this));
@@ -535,11 +537,13 @@ void SyncSchedulerImpl::DoConfigurationSyncCycleJob(JobPriority priority) {
pending_configure_params_->source, cycle.get());
if (success) {
+ LOG(ERROR) << "@@@@@ SyncSchedulerImpl::DoConfigurationSyncCycleJob 3";
SDVLOG(2) << "Configure succeeded.";
pending_configure_params_->ready_task.Run();
pending_configure_params_.reset();
HandleSuccess();
} else {
+ LOG(ERROR) << "@@@@@ SyncSchedulerImpl::DoConfigurationSyncCycleJob 4";
HandleFailure(cycle->status_controller().model_neutral_state());
// Sync cycle might receive response from server that causes scheduler to
// stop and draws pending_configure_params_ invalid.
« no previous file with comments | « components/sync/engine_impl/net/server_connection_manager.cc ('k') | components/sync/protocol/loopback_server.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698