Chromium Code Reviews| Index: components/gcm_driver/gcm_driver_desktop.cc |
| diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc |
| index 29e98b61b0fb2bf8fcef3ecf036b63c0b272f33d..b82f340b19cd3662327622b7248faec97e701cc1 100644 |
| --- a/components/gcm_driver/gcm_driver_desktop.cc |
| +++ b/components/gcm_driver/gcm_driver_desktop.cc |
| @@ -386,13 +386,18 @@ void GCMDriverDesktop::OnSignedIn() { |
| EnsureStarted(); |
| } |
| +void GCMDriverDesktop::OnSignedOut() { |
| + signed_in_ = false; |
| + |
| + // When sign-in enforcement is not dropped, we will stop the GCM connection |
| + // when the user signs out. |
| + if (!GCMDriver::IsAllowedForAllUsers()) |
| + Stop(); |
|
fgorski
2014/10/03 01:32:50
I think this leaves that app handlers still hangin
jianli
2014/10/06 07:07:02
I don't think we want to shut down the app handler
|
| +} |
| + |
| void GCMDriverDesktop::Purge() { |
| DCHECK(ui_thread_->RunsTasksOnCurrentThread()); |
| - // We still proceed with the check-out logic even if the check-in is not |
| - // initiated in the current session. This will make sure that all the |
| - // persisted data written previously will get purged. |
| - signed_in_ = false; |
| RemoveCachedData(); |
| io_thread_->PostTask(FROM_HERE, |