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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/extensions/external_filesystem_apitest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/audio/audio_observer.h" 9 #include "ash/system/audio/audio_observer.h"
10 #include "ash/system/bluetooth/bluetooth_observer.h" 10 #include "ash/system/bluetooth/bluetooth_observer.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); 222 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary();
223 if (crosnet) { 223 if (crosnet) {
224 crosnet->RemoveNetworkManagerObserver(this); 224 crosnet->RemoveNetworkManagerObserver(this);
225 crosnet->RemoveCellularDataPlanObserver(this); 225 crosnet->RemoveCellularDataPlanObserver(this);
226 } 226 }
227 input_method::InputMethodManager::GetInstance()->RemoveObserver(this); 227 input_method::InputMethodManager::GetInstance()->RemoveObserver(this);
228 system::TimezoneSettings::GetInstance()->RemoveObserver(this); 228 system::TimezoneSettings::GetInstance()->RemoveObserver(this);
229 if (SystemKeyEventListener::GetInstance()) 229 if (SystemKeyEventListener::GetInstance())
230 SystemKeyEventListener::GetInstance()->RemoveCapsLockObserver(this); 230 SystemKeyEventListener::GetInstance()->RemoveCapsLockObserver(this);
231 bluetooth_adapter_->RemoveObserver(this); 231 bluetooth_adapter_->RemoveObserver(this);
232
233 // Stop observing gdata operations.
234 Profile* profile = ProfileManager::GetDefaultProfile();
235 if (gdata::util::IsGDataAvailable(profile)) {
236 GDataSystemService* system_service =
237 GDataSystemServiceFactory::FindForProfile(profile);
238 if (system_service && system_service->file_system()) {
239 system_service->file_system()->GetOperationRegistry()->
240 RemoveObserver(this);
241 }
242 }
232 } 243 }
233 244
234 // Overridden from ash::SystemTrayDelegate: 245 // Overridden from ash::SystemTrayDelegate:
235 virtual bool GetTrayVisibilityOnStartup() OVERRIDE { 246 virtual bool GetTrayVisibilityOnStartup() OVERRIDE {
236 return !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled(); 247 return !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled();
237 } 248 }
238 249
239 virtual const std::string GetUserDisplayName() const OVERRIDE { 250 virtual const std::string GetUserDisplayName() const OVERRIDE {
240 return UserManager::Get()->GetLoggedInUser().GetDisplayName(); 251 return UserManager::Get()->GetLoggedInUser().GetDisplayName();
241 } 252 }
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1215 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1205 }; 1216 };
1206 1217
1207 } // namespace 1218 } // namespace
1208 1219
1209 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1220 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1210 return new chromeos::SystemTrayDelegate(tray); 1221 return new chromeos::SystemTrayDelegate(tray);
1211 } 1222 }
1212 1223
1213 } // namespace chromeos 1224 } // namespace chromeos
OLDNEW
« 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