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" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 // Copy the callbacks, we will re-use this for the remaining lifetime | 70 // Copy the callbacks, we will re-use this for the remaining lifetime |
71 // of this object. | 71 // of this object. |
72 status_callback_ = status_callback; | 72 status_callback_ = status_callback; |
73 promote_callback_ = promote_callback; | 73 promote_callback_ = promote_callback; |
74 | 74 |
75 KeystoneGlue* keystone_glue = [KeystoneGlue defaultKeystoneGlue]; | 75 KeystoneGlue* keystone_glue = [KeystoneGlue defaultKeystoneGlue]; |
76 if (keystone_glue && ![keystone_glue isOnReadOnlyFilesystem]) { | 76 if (keystone_glue && ![keystone_glue isOnReadOnlyFilesystem]) { |
77 AutoupdateStatus recent_status = [keystone_glue recentStatus]; | 77 AutoupdateStatus recent_status = [keystone_glue recentStatus]; |
78 if ([keystone_glue asyncOperationPending] || | 78 if ([keystone_glue asyncOperationPending] || |
79 recent_status == kAutoupdateRegisterFailed || | 79 recent_status == kAutoupdateRegisterFailed || |
80 recent_status == kAutoupdateCheckFailed || | |
81 recent_status == kAutoupdateInstallFailed || | 80 recent_status == kAutoupdateInstallFailed || |
Mark Mentovai
2012/08/14 02:33:14
I think that you should remove install-failed for
csilv
2012/08/14 17:32:51
Done.
| |
82 recent_status == kAutoupdatePromoteFailed || | 81 recent_status == kAutoupdatePromoteFailed || |
83 recent_status == kAutoupdateNeedsPromotion) { | 82 recent_status == kAutoupdateNeedsPromotion) { |
84 // If an asynchronous update operation is currently pending, such as a | 83 // If an asynchronous update operation is currently pending, such as a |
85 // check for updates or an update installation attempt, set the status | 84 // check for updates or an update installation attempt, set the status |
86 // up correspondingly without launching a new update check. | 85 // up correspondingly without launching a new update check. |
87 // | 86 // |
88 // If registration failed, no other operations make sense, so just go | 87 // If registration failed, no other operations make sense, so just go |
89 // straight to the error. | 88 // straight to the error. |
90 UpdateStatus([[keystone_glue recentNotification] userInfo]); | 89 UpdateStatus([[keystone_glue recentNotification] userInfo]); |
91 } else { | 90 } else { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 } else if (recent_status == kAutoupdatePromoting || | 233 } else if (recent_status == kAutoupdatePromoting || |
235 recent_status == kAutoupdatePromoteFailed) { | 234 recent_status == kAutoupdatePromoteFailed) { |
236 // Show promotion UI because the user either just clicked that button or | 235 // Show promotion UI because the user either just clicked that button or |
237 // because the user should be able to click it again. | 236 // because the user should be able to click it again. |
238 show_promote_button_ = true; | 237 show_promote_button_ = true; |
239 } else { | 238 } else { |
240 // Show the promote button if promotion is a possibility. | 239 // Show the promote button if promotion is a possibility. |
241 show_promote_button_ = [keystone_glue wantsPromotion]; | 240 show_promote_button_ = [keystone_glue wantsPromotion]; |
242 } | 241 } |
243 } | 242 } |
OLD | NEW |