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

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

Issue 10544034: gdata: Fix a crash at shutdown with pending gdata operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix RemoteFileSystemExtensionApiTest.RemoteMountPoint 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
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index d5449c49c9ab5ebee0f9a3fd91b5e6ceb338f29d..b07b1edf7180750fb78ba34471b32a49e968662a 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -229,6 +229,17 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
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