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

Unified Diff: components/sync/driver/glue/sync_backend_host_impl.cc

Issue 2624943002: [Sync] Move snapshot cache from SBHI to PSS. (Closed)
Patch Set: Address comments. Created 3 years, 11 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
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.h ('k') | components/sync/engine/fake_sync_engine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/glue/sync_backend_host_impl.cc
diff --git a/components/sync/driver/glue/sync_backend_host_impl.cc b/components/sync/driver/glue/sync_backend_host_impl.cc
index 6e825e666ec6da1d7ff34dbb49d79bfd2527848c..ff1a70e7738c43e668f251314436bdb64cc29579 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl.cc
@@ -250,10 +250,6 @@ SyncBackendHostImpl::Status SyncBackendHostImpl::GetDetailedStatus() {
return core_->sync_manager()->GetDetailedStatus();
}
-SyncCycleSnapshot SyncBackendHostImpl::GetLastCycleSnapshot() const {
- return last_snapshot_;
-}
-
bool SyncBackendHostImpl::HasUnsyncedItems() const {
DCHECK(initialized());
return core_->sync_manager()->HasUnsyncedItems();
@@ -384,20 +380,12 @@ void SyncBackendHostImpl::HandleSyncCycleCompletedOnFrontendLoop(
const SyncCycleSnapshot& snapshot) {
DCHECK(thread_checker_.CalledOnValidThread());
- last_snapshot_ = snapshot;
-
- SDVLOG(1) << "Got snapshot " << snapshot.ToString();
-
- if (!snapshot.poll_finish_time().is_null())
- sync_prefs_->SetLastPollTime(snapshot.poll_finish_time());
-
// Process any changes to the datatypes we're syncing.
// TODO(sync): add support for removing types.
- if (initialized())
+ if (initialized()) {
AddExperimentalTypes();
-
- if (initialized())
- host_->OnSyncCycleCompleted();
+ host_->OnSyncCycleCompleted(snapshot);
+ }
}
void SyncBackendHostImpl::RetryConfigurationOnFrontendLoop(
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.h ('k') | components/sync/engine/fake_sync_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698