OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/sync/glue/sync_backend_host_core.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_core.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "chrome/browser/sync/glue/invalidation_adapter.h" | 9 #include "chrome/browser/sync/glue/invalidation_adapter.h" |
10 #include "chrome/browser/sync/glue/local_device_info_provider_impl.h" | 10 #include "chrome/browser/sync/glue/local_device_info_provider_impl.h" |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 // UpdateCredentials can be called during backend initialization, possibly | 450 // UpdateCredentials can be called during backend initialization, possibly |
451 // when backend initialization has failed but hasn't notified the UI thread | 451 // when backend initialization has failed but hasn't notified the UI thread |
452 // yet. In that case, the sync manager may have been destroyed on the sync | 452 // yet. In that case, the sync manager may have been destroyed on the sync |
453 // thread before this task was executed, so we do nothing. | 453 // thread before this task was executed, so we do nothing. |
454 if (sync_manager_) { | 454 if (sync_manager_) { |
455 sync_manager_->UpdateCredentials(credentials); | 455 sync_manager_->UpdateCredentials(credentials); |
456 } | 456 } |
457 } | 457 } |
458 | 458 |
459 void SyncBackendHostCore::DoStartSyncing( | 459 void SyncBackendHostCore::DoStartSyncing( |
460 const syncer::ModelSafeRoutingInfo& routing_info, | 460 const syncer::ModelSafeRoutingInfo& routing_info) { |
461 base::Time last_poll_time) { | |
462 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 461 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
463 sync_manager_->StartSyncingNormally(routing_info, last_poll_time); | 462 sync_manager_->StartSyncingNormally(routing_info); |
464 } | 463 } |
465 | 464 |
466 void SyncBackendHostCore::DoSetEncryptionPassphrase( | 465 void SyncBackendHostCore::DoSetEncryptionPassphrase( |
467 const std::string& passphrase, | 466 const std::string& passphrase, |
468 bool is_explicit) { | 467 bool is_explicit) { |
469 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 468 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
470 sync_manager_->GetEncryptionHandler()->SetEncryptionPassphrase( | 469 sync_manager_->GetEncryptionHandler()->SetEncryptionPassphrase( |
471 passphrase, is_explicit); | 470 passphrase, is_explicit); |
472 } | 471 } |
473 | 472 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds), | 722 base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds), |
724 this, &SyncBackendHostCore::SaveChanges); | 723 this, &SyncBackendHostCore::SaveChanges); |
725 } | 724 } |
726 | 725 |
727 void SyncBackendHostCore::SaveChanges() { | 726 void SyncBackendHostCore::SaveChanges() { |
728 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 727 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
729 sync_manager_->SaveChanges(); | 728 sync_manager_->SaveChanges(); |
730 } | 729 } |
731 | 730 |
732 } // namespace browser_sync | 731 } // namespace browser_sync |
OLD | NEW |