| Index: chrome/service/cloud_print/cloud_print_proxy_backend.cc
|
| diff --git a/chrome/service/cloud_print/cloud_print_proxy_backend.cc b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
|
| index cbf55ee2860a82081df6a00bd212e9ecb27cc910..2268fc829b7aab757911e1e7e1c4d1fcb322c67e 100644
|
| --- a/chrome/service/cloud_print/cloud_print_proxy_backend.cc
|
| +++ b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
|
| @@ -381,10 +381,11 @@ void CloudPrintProxyBackend::Core::DoInitializeWithToken(
|
| subscription.channel.append(proxy_id);
|
| subscription.from = kCloudPrintPushNotificationsSource;
|
| push_notifications_channel_ = subscription.channel;
|
| - talk_mediator_->AddSubscription(subscription);
|
| talk_mediator_->SetDelegate(this);
|
| + // SetAuthToken should be called before AddSubscription.
|
| talk_mediator_->SetAuthToken(email, cloud_print_xmpp_token,
|
| kSyncGaiaServiceId);
|
| + talk_mediator_->AddSubscription(subscription);
|
| talk_mediator_->Login();
|
|
|
| print_server_watcher_ = print_system_->CreatePrintServerWatcher();
|
| @@ -449,6 +450,7 @@ void CloudPrintProxyBackend::Core::DoShutdown() {
|
| index->second->Shutdown();
|
| }
|
| // Important to delete the TalkMediator on this thread.
|
| + talk_mediator_->Logout();
|
| talk_mediator_.reset();
|
| notifications_enabled_ = false;
|
| notifications_enabled_since_ = base::TimeTicks();
|
|
|