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

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

Issue 408003002: [Sync] Fix namespace for sync_driver component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile and chrome/ usage Created 6 years, 5 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_impl.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 sync_prefs_->HasSyncSetupCompleted(), 88 sync_prefs_->HasSyncSetupCompleted(),
89 weak_ptr_factory_.GetWeakPtr()); 89 weak_ptr_factory_.GetWeakPtr());
90 } 90 }
91 91
92 SyncBackendHostImpl::~SyncBackendHostImpl() { 92 SyncBackendHostImpl::~SyncBackendHostImpl() {
93 DCHECK(!core_.get() && !frontend_) << "Must call Shutdown before destructor."; 93 DCHECK(!core_.get() && !frontend_) << "Must call Shutdown before destructor.";
94 DCHECK(!registrar_.get()); 94 DCHECK(!registrar_.get());
95 } 95 }
96 96
97 void SyncBackendHostImpl::Initialize( 97 void SyncBackendHostImpl::Initialize(
98 SyncFrontend* frontend, 98 sync_driver::SyncFrontend* frontend,
99 scoped_ptr<base::Thread> sync_thread, 99 scoped_ptr<base::Thread> sync_thread,
100 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, 100 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
101 const GURL& sync_service_url, 101 const GURL& sync_service_url,
102 const syncer::SyncCredentials& credentials, 102 const syncer::SyncCredentials& credentials,
103 bool delete_sync_data_folder, 103 bool delete_sync_data_folder,
104 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, 104 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory,
105 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, 105 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler,
106 syncer::ReportUnrecoverableErrorFunction 106 syncer::ReportUnrecoverableErrorFunction
107 report_unrecoverable_error_function, 107 report_unrecoverable_error_function,
108 syncer::NetworkResources* network_resources) { 108 syncer::NetworkResources* network_resources) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } 445 }
446 446
447 void SyncBackendHostImpl::EnableEncryptEverything() { 447 void SyncBackendHostImpl::EnableEncryptEverything() {
448 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE, 448 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE,
449 base::Bind(&SyncBackendHostCore::DoEnableEncryptEverything, 449 base::Bind(&SyncBackendHostCore::DoEnableEncryptEverything,
450 core_.get())); 450 core_.get()));
451 } 451 }
452 452
453 void SyncBackendHostImpl::ActivateDataType( 453 void SyncBackendHostImpl::ActivateDataType(
454 syncer::ModelType type, syncer::ModelSafeGroup group, 454 syncer::ModelType type, syncer::ModelSafeGroup group,
455 ChangeProcessor* change_processor) { 455 sync_driver::ChangeProcessor* change_processor) {
456 registrar_->ActivateDataType(type, group, change_processor, GetUserShare()); 456 registrar_->ActivateDataType(type, group, change_processor, GetUserShare());
457 } 457 }
458 458
459 void SyncBackendHostImpl::DeactivateDataType(syncer::ModelType type) { 459 void SyncBackendHostImpl::DeactivateDataType(syncer::ModelType type) {
460 registrar_->DeactivateDataType(type); 460 registrar_->DeactivateDataType(type);
461 } 461 }
462 462
463 syncer::UserShare* SyncBackendHostImpl::GetUserShare() const { 463 syncer::UserShare* SyncBackendHostImpl::GetUserShare() const {
464 return core_->sync_manager()->GetUserShare(); 464 return core_->sync_manager()->GetUserShare();
465 } 465 }
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 881
882 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { 882 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() {
883 return registrar_->sync_thread()->message_loop(); 883 return registrar_->sync_thread()->message_loop();
884 } 884 }
885 885
886 } // namespace browser_sync 886 } // namespace browser_sync
887 887
888 #undef SDVLOG 888 #undef SDVLOG
889 889
890 #undef SLOG 890 #undef SLOG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698