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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_core.cc

Issue 351523003: sync: Mass rename of non-blocking sync classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const ref some smart pointers Created 6 years, 6 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 | Annotate | Revision Log
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 "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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/sync/glue/device_info.h" 9 #include "chrome/browser/sync/glue/device_info.h"
10 #include "chrome/browser/sync/glue/sync_backend_registrar.h" 10 #include "chrome/browser/sync/glue/sync_backend_registrar.h"
11 #include "chrome/browser/sync/glue/synced_device_tracker.h" 11 #include "chrome/browser/sync/glue/synced_device_tracker.h"
12 #include "chrome/common/chrome_version_info.h" 12 #include "chrome/common/chrome_version_info.h"
13 #include "sync/internal_api/public/events/protocol_event.h" 13 #include "sync/internal_api/public/events/protocol_event.h"
14 #include "sync/internal_api/public/http_post_provider_factory.h" 14 #include "sync/internal_api/public/http_post_provider_factory.h"
15 #include "sync/internal_api/public/internal_components_factory.h" 15 #include "sync/internal_api/public/internal_components_factory.h"
16 #include "sync/internal_api/public/sessions/commit_counters.h" 16 #include "sync/internal_api/public/sessions/commit_counters.h"
17 #include "sync/internal_api/public/sessions/status_counters.h" 17 #include "sync/internal_api/public/sessions/status_counters.h"
18 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" 18 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
19 #include "sync/internal_api/public/sessions/update_counters.h" 19 #include "sync/internal_api/public/sessions/update_counters.h"
20 #include "sync/internal_api/public/sync_core_proxy.h" 20 #include "sync/internal_api/public/sync_context_proxy.h"
21 #include "sync/internal_api/public/sync_manager.h" 21 #include "sync/internal_api/public/sync_manager.h"
22 #include "sync/internal_api/public/sync_manager_factory.h" 22 #include "sync/internal_api/public/sync_manager_factory.h"
23 23
24 // Helper macros to log with the syncer thread name; useful when there 24 // Helper macros to log with the syncer thread name; useful when there
25 // are multiple syncers involved. 25 // are multiple syncers involved.
26 26
27 #define SLOG(severity) LOG(severity) << name_ << ": " 27 #define SLOG(severity) LOG(severity) << name_ << ": "
28 28
29 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": " 29 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": "
30 30
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 } 487 }
488 488
489 void SyncBackendHostCore::DoFinishInitialProcessControlTypes() { 489 void SyncBackendHostCore::DoFinishInitialProcessControlTypes() {
490 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 490 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
491 491
492 registrar_->ActivateDataType(syncer::DEVICE_INFO, 492 registrar_->ActivateDataType(syncer::DEVICE_INFO,
493 syncer::GROUP_PASSIVE, 493 syncer::GROUP_PASSIVE,
494 synced_device_tracker_.get(), 494 synced_device_tracker_.get(),
495 sync_manager_->GetUserShare()); 495 sync_manager_->GetUserShare());
496 496
497 host_.Call( 497 host_.Call(FROM_HERE,
498 FROM_HERE, 498 &SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop,
499 &SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop, 499 js_backend_,
500 js_backend_, 500 debug_info_listener_,
501 debug_info_listener_, 501 sync_manager_->GetSyncContextProxy());
502 sync_manager_->GetSyncCoreProxy());
503 502
504 js_backend_.Reset(); 503 js_backend_.Reset();
505 debug_info_listener_.Reset(); 504 debug_info_listener_.Reset();
506 } 505 }
507 506
508 void SyncBackendHostCore::DoSetDecryptionPassphrase( 507 void SyncBackendHostCore::DoSetDecryptionPassphrase(
509 const std::string& passphrase) { 508 const std::string& passphrase) {
510 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 509 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
511 sync_manager_->GetEncryptionHandler()->SetDecryptionPassphrase( 510 sync_manager_->GetEncryptionHandler()->SetDecryptionPassphrase(
512 passphrase); 511 passphrase);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 this, &SyncBackendHostCore::SaveChanges); 717 this, &SyncBackendHostCore::SaveChanges);
719 } 718 }
720 719
721 void SyncBackendHostCore::SaveChanges() { 720 void SyncBackendHostCore::SaveChanges() {
722 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 721 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
723 sync_manager_->SaveChanges(); 722 sync_manager_->SaveChanges();
724 } 723 }
725 724
726 } // namespace browser_sync 725 } // namespace browser_sync
727 726
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.h ('k') | chrome/browser/sync/glue/sync_backend_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698