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

Side by Side Diff: chrome/browser/ui/webui/help/version_updater_mac.mm

Issue 10830295: [mac] Don't consider kAutoupdateCheckFailed as a permanent failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 ||
82 recent_status == kAutoupdatePromoteFailed ||
83 recent_status == kAutoupdateNeedsPromotion) { 80 recent_status == kAutoupdateNeedsPromotion) {
84 // If an asynchronous update operation is currently pending, such as a 81 // If an asynchronous update operation is currently pending, such as a
85 // check for updates or an update installation attempt, set the status 82 // check for updates or an update installation attempt, set the status
86 // up correspondingly without launching a new update check. 83 // up correspondingly without launching a new update check.
87 // 84 //
88 // If registration failed, no other operations make sense, so just go 85 // If registration failed, no other operations make sense, so just go
89 // straight to the error. 86 // straight to the error.
90 UpdateStatus([[keystone_glue recentNotification] userInfo]); 87 UpdateStatus([[keystone_glue recentNotification] userInfo]);
91 } else { 88 } else {
92 // Launch a new update check, even if one was already completed, because 89 // Launch a new update check, even if one was already completed, because
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } else if (recent_status == kAutoupdatePromoting || 231 } else if (recent_status == kAutoupdatePromoting ||
235 recent_status == kAutoupdatePromoteFailed) { 232 recent_status == kAutoupdatePromoteFailed) {
236 // Show promotion UI because the user either just clicked that button or 233 // Show promotion UI because the user either just clicked that button or
237 // because the user should be able to click it again. 234 // because the user should be able to click it again.
238 show_promote_button_ = true; 235 show_promote_button_ = true;
239 } else { 236 } else {
240 // Show the promote button if promotion is a possibility. 237 // Show the promote button if promotion is a possibility.
241 show_promote_button_ = [keystone_glue wantsPromotion]; 238 show_promote_button_ = [keystone_glue wantsPromotion];
242 } 239 }
243 } 240 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698