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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 11094061: drive: Move IsDriveEnabled() and DisableDrive() to DriveSystemService (Closed) Base URL: http://git.chromium.org/chromium/src.git@drive_available
Patch Set: rebase Created 8 years, 2 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "chrome/browser/chromeos/login/login_display_host.h" 46 #include "chrome/browser/chromeos/login/login_display_host.h"
47 #include "chrome/browser/chromeos/login/message_bubble.h" 47 #include "chrome/browser/chromeos/login/message_bubble.h"
48 #include "chrome/browser/chromeos/login/user.h" 48 #include "chrome/browser/chromeos/login/user.h"
49 #include "chrome/browser/chromeos/login/user_manager.h" 49 #include "chrome/browser/chromeos/login/user_manager.h"
50 #include "chrome/browser/chromeos/mobile_config.h" 50 #include "chrome/browser/chromeos/mobile_config.h"
51 #include "chrome/browser/chromeos/status/data_promo_notification.h" 51 #include "chrome/browser/chromeos/status/data_promo_notification.h"
52 #include "chrome/browser/chromeos/status/network_menu.h" 52 #include "chrome/browser/chromeos/status/network_menu.h"
53 #include "chrome/browser/chromeos/status/network_menu_icon.h" 53 #include "chrome/browser/chromeos/status/network_menu_icon.h"
54 #include "chrome/browser/chromeos/system/timezone_settings.h" 54 #include "chrome/browser/chromeos/system/timezone_settings.h"
55 #include "chrome/browser/chromeos/system_key_event_listener.h" 55 #include "chrome/browser/chromeos/system_key_event_listener.h"
56 #include "chrome/browser/google_apis/gdata_util.h"
57 #include "chrome/browser/lifetime/application_lifetime.h" 56 #include "chrome/browser/lifetime/application_lifetime.h"
58 #include "chrome/browser/prefs/pref_service.h" 57 #include "chrome/browser/prefs/pref_service.h"
59 #include "chrome/browser/profiles/profile_manager.h" 58 #include "chrome/browser/profiles/profile_manager.h"
60 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" 59 #include "chrome/browser/ui/ash/volume_controller_chromeos.h"
61 #include "chrome/browser/ui/browser.h" 60 #include "chrome/browser/ui/browser.h"
62 #include "chrome/browser/ui/browser_finder.h" 61 #include "chrome/browser/ui/browser_finder.h"
63 #include "chrome/browser/ui/chrome_pages.h" 62 #include "chrome/browser/ui/chrome_pages.h"
64 #include "chrome/browser/ui/host_desktop.h" 63 #include "chrome/browser/ui/host_desktop.h"
65 #include "chrome/browser/ui/singleton_tabs.h" 64 #include "chrome/browser/ui/singleton_tabs.h"
66 #include "chrome/browser/upgrade_detector.h" 65 #include "chrome/browser/upgrade_detector.h"
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 void RecheckGDataOperations() { 1136 void RecheckGDataOperations() {
1138 DriveSystemService* system_service = FindDriveSystemService(); 1137 DriveSystemService* system_service = FindDriveSystemService();
1139 if (!system_service) 1138 if (!system_service)
1140 return; 1139 return;
1141 1140
1142 OnProgressUpdate(system_service->drive_service()->GetProgressStatusList()); 1141 OnProgressUpdate(system_service->drive_service()->GetProgressStatusList());
1143 } 1142 }
1144 1143
1145 DriveSystemService* FindDriveSystemService() { 1144 DriveSystemService* FindDriveSystemService() {
1146 Profile* profile = ProfileManager::GetDefaultProfile(); 1145 Profile* profile = ProfileManager::GetDefaultProfile();
1147 if (!gdata::util::IsDriveEnabled(profile)) 1146 if (!gdata::DriveSystemService::IsDriveEnabled(profile))
1148 return NULL; 1147 return NULL;
1149 return DriveSystemServiceFactory::FindForProfile(profile); 1148 return DriveSystemServiceFactory::FindForProfile(profile);
1150 } 1149 }
1151 1150
1152 // Overridden from system::TimezoneSettings::Observer. 1151 // Overridden from system::TimezoneSettings::Observer.
1153 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE { 1152 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE {
1154 NotifyRefreshClock(); 1153 NotifyRefreshClock();
1155 } 1154 }
1156 1155
1157 // Overridden from BluetoothAdapter::Observer. 1156 // Overridden from BluetoothAdapter::Observer.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1261 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1263 }; 1262 };
1264 1263
1265 } // namespace 1264 } // namespace
1266 1265
1267 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1266 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1268 return new chromeos::SystemTrayDelegate(tray); 1267 return new chromeos::SystemTrayDelegate(tray);
1269 } 1268 }
1270 1269
1271 } // namespace chromeos 1270 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698