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

Unified Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 10546050: Merge 140889 - gdata: Fix a crash at shutdown with pending gdata operations (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/extensions/external_filesystem_apitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc
===================================================================
--- chrome/browser/chromeos/system/ash_system_tray_delegate.cc (revision 141016)
+++ chrome/browser/chromeos/system/ash_system_tray_delegate.cc (working copy)
@@ -229,6 +229,17 @@
if (SystemKeyEventListener::GetInstance())
SystemKeyEventListener::GetInstance()->RemoveCapsLockObserver(this);
bluetooth_adapter_->RemoveObserver(this);
+
+ // Stop observing gdata operations.
+ Profile* profile = ProfileManager::GetDefaultProfile();
+ if (gdata::util::IsGDataAvailable(profile)) {
+ GDataSystemService* system_service =
+ GDataSystemServiceFactory::FindForProfile(profile);
+ if (system_service && system_service->file_system()) {
+ system_service->file_system()->GetOperationRegistry()->
+ RemoveObserver(this);
+ }
+ }
}
// Overridden from ash::SystemTrayDelegate:
« no previous file with comments | « chrome/browser/chromeos/extensions/external_filesystem_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698