| Index: chrome/browser/sync/glue/sync_backend_host.cc
|
| diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
|
| index d765273e16a0bbcf8f369438714f8034fb58df22..0c36f3d78bda2b461c15232f179baed0c7ab70ec 100644
|
| --- a/chrome/browser/sync/glue/sync_backend_host.cc
|
| +++ b/chrome/browser/sync/glue/sync_backend_host.cc
|
| @@ -101,6 +101,7 @@ void SyncBackendHost::Initialize(
|
| it != types.end(); ++it) {
|
| registrar_.routing_info[(*it)] = GROUP_PASSIVE;
|
| }
|
| + registrar_.routing_info[syncable::NIGORI] = GROUP_PASSIVE;
|
|
|
| core_thread_.message_loop()->PostTask(FROM_HERE,
|
| NewRunnableMethod(core_.get(), &SyncBackendHost::Core::DoInitialize,
|
| @@ -129,6 +130,12 @@ void SyncBackendHost::StartSyncing() {
|
| NewRunnableMethod(core_.get(), &SyncBackendHost::Core::DoStartSyncing));
|
| }
|
|
|
| +void SyncBackendHost::SetPassphrase(const std::string& passphrase) {
|
| + core_thread_.message_loop()->PostTask(FROM_HERE,
|
| + NewRunnableMethod(core_.get(), &SyncBackendHost::Core::DoSetPassphrase,
|
| + passphrase));
|
| +}
|
| +
|
| void SyncBackendHost::Shutdown(bool sync_disabled) {
|
| // Thread shutdown should occur in the following order:
|
| // - SyncerThread
|
| @@ -275,6 +282,20 @@ void SyncBackendHost::Core::NotifyResumed() {
|
| NotificationService::NoDetails());
|
| }
|
|
|
| +void SyncBackendHost::Core::NotifyPassphraseRequired() {
|
| + NotificationService::current()->Notify(
|
| + NotificationType::SYNC_PASSPHRASE_REQUIRED,
|
| + NotificationService::AllSources(),
|
| + NotificationService::NoDetails());
|
| +}
|
| +
|
| +void SyncBackendHost::Core::NotifyPassphraseAccepted() {
|
| + NotificationService::current()->Notify(
|
| + NotificationType::SYNC_PASSPHRASE_ACCEPTED,
|
| + NotificationService::AllSources(),
|
| + NotificationService::NoDetails());
|
| +}
|
| +
|
| SyncBackendHost::UserShareHandle SyncBackendHost::GetUserShareHandle() const {
|
| return core_->syncapi()->GetUserShare();
|
| }
|
| @@ -400,6 +421,11 @@ void SyncBackendHost::Core::DoStartSyncing() {
|
| syncapi_->StartSyncing();
|
| }
|
|
|
| +void SyncBackendHost::Core::DoSetPassphrase(const std::string& passphrase) {
|
| + DCHECK(MessageLoop::current() == host_->core_thread_.message_loop());
|
| + syncapi_->SetPassphrase(passphrase);
|
| +}
|
| +
|
| UIModelWorker* SyncBackendHost::ui_worker() {
|
| ModelSafeWorker* w = registrar_.workers[GROUP_UI];
|
| if (w == NULL)
|
| @@ -543,6 +569,16 @@ void SyncBackendHost::Core::OnAuthError(const AuthError& auth_error) {
|
| auth_error));
|
| }
|
|
|
| +void SyncBackendHost::Core::OnPassphraseRequired() {
|
| + host_->frontend_loop_->PostTask(FROM_HERE,
|
| + NewRunnableMethod(this, &Core::NotifyPassphraseRequired));
|
| +}
|
| +
|
| +void SyncBackendHost::Core::OnPassphraseAccepted() {
|
| + host_->frontend_loop_->PostTask(FROM_HERE,
|
| + NewRunnableMethod(this, &Core::NotifyPassphraseAccepted));
|
| +}
|
| +
|
| void SyncBackendHost::Core::OnPaused() {
|
| host_->frontend_loop_->PostTask(
|
| FROM_HERE,
|
|
|