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

Unified Diff: chrome/browser/chromeos/upgrade_detector_chromeos.cc

Issue 2882933002: Add update available icon in system tray (Closed)
Patch Set: Add file to BUILD.gn Created 3 years, 7 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/BUILD.gn ('k') | chrome/browser/resources/settings/about_page/about_page.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/upgrade_detector_chromeos.cc
diff --git a/chrome/browser/chromeos/upgrade_detector_chromeos.cc b/chrome/browser/chromeos/upgrade_detector_chromeos.cc
index ecc130b350f94676476f8b3746a1c9170d64d9d3..4178576bc484b20ffaa56b5c6b6771f0a9ff992d 100644
--- a/chrome/browser/chromeos/upgrade_detector_chromeos.cc
+++ b/chrome/browser/chromeos/upgrade_detector_chromeos.cc
@@ -92,15 +92,19 @@ void UpgradeDetectorChromeos::Shutdown() {
void UpgradeDetectorChromeos::UpdateStatusChanged(
const UpdateEngineClient::Status& status) {
- if (status.status != UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT)
- return;
-
- upgrade_detected_time_ = base::Time::Now();
-
- channels_requester_.reset(new UpgradeDetectorChromeos::ChannelsRequester());
- channels_requester_->RequestChannels(
- base::Bind(&UpgradeDetectorChromeos::OnChannelsReceived,
- weak_factory_.GetWeakPtr()));
+ if (status.status == UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT) {
+ upgrade_detected_time_ = base::Time::Now();
+
+ channels_requester_.reset(new UpgradeDetectorChromeos::ChannelsRequester());
+ channels_requester_->RequestChannels(
+ base::Bind(&UpgradeDetectorChromeos::OnChannelsReceived,
+ weak_factory_.GetWeakPtr()));
+ } else if (status.status ==
+ UpdateEngineClient::UPDATE_STATUS_NEED_PERMISSION_TO_UPDATE) {
+ // Update engine broadcasts this state only when update is available but
+ // downloading over cellular connection requires user's agreement
+ NotifyUpdateOverCellularAvailable();
+ }
}
void UpgradeDetectorChromeos::NotifyOnUpgrade() {
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/resources/settings/about_page/about_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698