| OLD | NEW |
| 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/ui/webui/help/version_updater_mac.h" | 5 #include "chrome/browser/ui/webui/help/version_updater_mac.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "chrome/browser/lifetime/application_lifetime.h" | 9 #include "chrome/browser/lifetime/application_lifetime.h" |
| 10 #import "chrome/browser/mac/keystone_glue.h" | 10 #import "chrome/browser/mac/keystone_glue.h" |
| 11 #include "chrome/browser/mac/obsolete_system.h" | 11 #include "chrome/browser/mac/obsolete_system.h" |
| 12 #include "grit/chromium_strings.h" | 12 #include "chrome/grit/chromium_strings.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
| 15 | 15 |
| 16 // KeystoneObserver is a simple notification observer for Keystone status | 16 // KeystoneObserver is a simple notification observer for Keystone status |
| 17 // updates. It will be created and managed by VersionUpdaterMac. | 17 // updates. It will be created and managed by VersionUpdaterMac. |
| 18 @interface KeystoneObserver : NSObject { | 18 @interface KeystoneObserver : NSObject { |
| 19 @private | 19 @private |
| 20 VersionUpdaterMac* versionUpdater_; // Weak. | 20 VersionUpdaterMac* versionUpdater_; // Weak. |
| 21 } | 21 } |
| 22 | 22 |
| 23 // Initialize an observer with an updater. The updater owns this object. | 23 // Initialize an observer with an updater. The updater owns this object. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } else if (recent_status == kAutoupdatePromoting || | 241 } else if (recent_status == kAutoupdatePromoting || |
| 242 recent_status == kAutoupdatePromoteFailed) { | 242 recent_status == kAutoupdatePromoteFailed) { |
| 243 // Show promotion UI because the user either just clicked that button or | 243 // Show promotion UI because the user either just clicked that button or |
| 244 // because the user should be able to click it again. | 244 // because the user should be able to click it again. |
| 245 show_promote_button_ = true; | 245 show_promote_button_ = true; |
| 246 } else { | 246 } else { |
| 247 // Show the promote button if promotion is a possibility. | 247 // Show the promote button if promotion is a possibility. |
| 248 show_promote_button_ = [keystone_glue wantsPromotion]; | 248 show_promote_button_ = [keystone_glue wantsPromotion]; |
| 249 } | 249 } |
| 250 } | 250 } |
| OLD | NEW |