Index: chrome/browser/ui/ash/system_tray_client.cc |
diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc |
index be329e66571038c8989acefceb70d21492aa2b3c..73a03025cc82fe17b06ace8221157c738465bf0d 100644 |
--- a/chrome/browser/ui/ash/system_tray_client.cc |
+++ b/chrome/browser/ui/ash/system_tray_client.cc |
@@ -10,6 +10,7 @@ |
#include "ash/shell.h" |
#include "base/feature_list.h" |
#include "base/logging.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/metrics/user_metrics.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/browser_process_platform_part.h" |
@@ -61,6 +62,7 @@ |
using chromeos::BluetoothPairingDialog; |
using chromeos::DBusThreadManager; |
using chromeos::LoginState; |
+using chromeos::UpdateEngineClient; |
using device::BluetoothDevice; |
using views::Widget; |
@@ -108,6 +110,8 @@ SystemTrayClient::SystemTrayClient() : binding_(this) { |
registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED, |
content::NotificationService::AllSources()); |
+ registrar_.Add(this, chrome::NOTIFICATION_UPDATE_OVER_CELLULAR_AVAILABLE, |
+ content::NotificationService::AllSources()); |
// If an upgrade is available at startup then tell ash about it. |
if (UpgradeDetector::GetInstance()->notify_upgrade()) |
@@ -294,6 +298,13 @@ void SystemTrayClient::ShowIMESettings() { |
ShowSettingsSubPageForActiveUser(chrome::kLanguageOptionsSubPage); |
} |
+void SystemTrayClient::ShowAboutChromeOS() { |
+ // We always want to check for updates when showing the about page from the |
+ // Ash UI. |
+ ShowSettingsSubPageForActiveUser(std::string(chrome::kHelpSubPage) + |
+ "?checkForUpdate=true"); |
+} |
+ |
void SystemTrayClient::ShowHelp() { |
chrome::ShowHelpForProfile(ProfileManager::GetActiveUserProfile(), |
chrome::HELP_SOURCE_MENU); |
@@ -460,6 +471,10 @@ void SystemTrayClient::HandleUpdateAvailable() { |
update_type); |
} |
+void SystemTrayClient::HandleUpdateOverCellularAvailable() { |
+ system_tray_->ShowUpdateOverCellularAvailableIcon(); |
+} |
+ |
//////////////////////////////////////////////////////////////////////////////// |
// chromeos::system::SystemClockObserver: |
@@ -471,8 +486,10 @@ void SystemTrayClient::OnSystemClockChanged( |
void SystemTrayClient::Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) { |
- DCHECK_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, type); |
- HandleUpdateAvailable(); |
+ if (chrome::NOTIFICATION_UPGRADE_RECOMMENDED == type) |
+ HandleUpdateAvailable(); |
+ else if (chrome::NOTIFICATION_UPDATE_OVER_CELLULAR_AVAILABLE == type) |
+ HandleUpdateOverCellularAvailable(); |
} |
//////////////////////////////////////////////////////////////////////////////// |