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

Unified Diff: chrome/browser/ui/webui/help/version_updater_mac.mm

Issue 2583743002: Add mac-only "Set Up Automatic Updates..." button to the new about page. (Closed)
Patch Set: add back nullptr check Created 4 years 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/ui/webui/help/version_updater.h ('k') | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/help/version_updater_mac.mm
diff --git a/chrome/browser/ui/webui/help/version_updater_mac.mm b/chrome/browser/ui/webui/help/version_updater_mac.mm
index b3ad6244937376d1cdec4ddc2715a82efb2af162..2347f3fa7563407a629ea2fbd6c7a808f5c557cd 100644
--- a/chrome/browser/ui/webui/help/version_updater_mac.mm
+++ b/chrome/browser/ui/webui/help/version_updater_mac.mm
@@ -237,11 +237,20 @@ void VersionUpdaterMac::UpdateStatus(NSDictionary* dictionary) {
if (!status_callback_.is_null())
status_callback_.Run(status, 0, message);
+ PromotionState promotion_state;
if (!promote_callback_.is_null()) {
- PromotionState promotion_state = PROMOTE_HIDDEN;
- if (show_promote_button_)
- promotion_state = enable_promote_button ? PROMOTE_ENABLED
- : PROMOTE_DISABLED;
+ KeystoneGlue* keystone_glue = [KeystoneGlue defaultKeystoneGlue];
+ if (keystone_glue && [keystone_glue isAutoupdateEnabledForAllUsers]) {
+ promotion_state = PROMOTED;
+ } else {
+ promotion_state = PROMOTE_HIDDEN;
+
+ if (show_promote_button_) {
+ promotion_state = enable_promote_button ? PROMOTE_ENABLED
+ : PROMOTE_DISABLED;
+ }
+ }
+
promote_callback_.Run(promotion_state);
}
}
« no previous file with comments | « chrome/browser/ui/webui/help/version_updater.h ('k') | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698