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

Side by Side Diff: components/sync/driver/glue/sync_backend_host_impl.cc

Issue 2258873003: [Sync] Move sessions/ to engine/cycle/ and rename things to match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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 "components/sync/driver/glue/sync_backend_host_impl.h" 5 #include "components/sync/driver/glue/sync_backend_host_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 439
440 syncer::UserShare* SyncBackendHostImpl::GetUserShare() const { 440 syncer::UserShare* SyncBackendHostImpl::GetUserShare() const {
441 return core_->sync_manager()->GetUserShare(); 441 return core_->sync_manager()->GetUserShare();
442 } 442 }
443 443
444 SyncBackendHostImpl::Status SyncBackendHostImpl::GetDetailedStatus() { 444 SyncBackendHostImpl::Status SyncBackendHostImpl::GetDetailedStatus() {
445 DCHECK(initialized()); 445 DCHECK(initialized());
446 return core_->sync_manager()->GetDetailedStatus(); 446 return core_->sync_manager()->GetDetailedStatus();
447 } 447 }
448 448
449 syncer::sessions::SyncSessionSnapshot 449 syncer::SyncCycleSnapshot SyncBackendHostImpl::GetLastCycleSnapshot() const {
450 SyncBackendHostImpl::GetLastSessionSnapshot() const {
451 return last_snapshot_; 450 return last_snapshot_;
452 } 451 }
453 452
454 bool SyncBackendHostImpl::HasUnsyncedItems() const { 453 bool SyncBackendHostImpl::HasUnsyncedItems() const {
455 DCHECK(initialized()); 454 DCHECK(initialized());
456 return core_->sync_manager()->HasUnsyncedItems(); 455 return core_->sync_manager()->HasUnsyncedItems();
457 } 456 }
458 457
459 bool SyncBackendHostImpl::IsNigoriEnabled() const { 458 bool SyncBackendHostImpl::IsNigoriEnabled() const {
460 return registrar_.get() && registrar_->IsNigoriEnabled(); 459 return registrar_.get() && registrar_->IsNigoriEnabled();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 DCHECK(frontend_task_runner_->BelongsToCurrentThread()); 619 DCHECK(frontend_task_runner_->BelongsToCurrentThread());
621 if (!frontend_) 620 if (!frontend_)
622 return; 621 return;
623 622
624 frontend_->OnBackendInitialized( 623 frontend_->OnBackendInitialized(
625 syncer::WeakHandle<syncer::JsBackend>(), 624 syncer::WeakHandle<syncer::JsBackend>(),
626 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), "", false); 625 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), "", false);
627 } 626 }
628 627
629 void SyncBackendHostImpl::HandleSyncCycleCompletedOnFrontendLoop( 628 void SyncBackendHostImpl::HandleSyncCycleCompletedOnFrontendLoop(
630 const syncer::sessions::SyncSessionSnapshot& snapshot) { 629 const syncer::SyncCycleSnapshot& snapshot) {
631 if (!frontend_) 630 if (!frontend_)
632 return; 631 return;
633 DCHECK(frontend_task_runner_->BelongsToCurrentThread()); 632 DCHECK(frontend_task_runner_->BelongsToCurrentThread());
634 633
635 last_snapshot_ = snapshot; 634 last_snapshot_ = snapshot;
636 635
637 SDVLOG(1) << "Got snapshot " << snapshot.ToString(); 636 SDVLOG(1) << "Got snapshot " << snapshot.ToString();
638 637
639 if (!snapshot.poll_finish_time().is_null()) 638 if (!snapshot.poll_finish_time().is_null())
640 sync_prefs_->SetLastPollTime(snapshot.poll_finish_time()); 639 sync_prefs_->SetLastPollTime(snapshot.poll_finish_time());
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 const syncer::SyncManager::ClearServerDataCallback& frontend_callback) { 849 const syncer::SyncManager::ClearServerDataCallback& frontend_callback) {
851 DCHECK(ui_thread_->BelongsToCurrentThread()); 850 DCHECK(ui_thread_->BelongsToCurrentThread());
852 frontend_callback.Run(); 851 frontend_callback.Run();
853 } 852 }
854 853
855 } // namespace browser_sync 854 } // namespace browser_sync
856 855
857 #undef SDVLOG 856 #undef SDVLOG
858 857
859 #undef SLOG 858 #undef SLOG
OLDNEW
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.h ('k') | components/sync/driver/glue/sync_backend_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698