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

Side by Side Diff: chrome/browser/ui/webui/help/version_updater_win.cc

Issue 17261014: Add support to Google Update wrappers for the "automatic updates only" group policy setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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
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 "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/version.h" 9 #include "base/version.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 return; 207 return;
208 } 208 }
209 case UPGRADE_SUCCESSFUL: { 209 case UPGRADE_SUCCESSFUL: {
210 content::RecordAction(UserMetricsAction("UpgradeCheck_Upgraded")); 210 content::RecordAction(UserMetricsAction("UpgradeCheck_Upgraded"));
211 status = NEARLY_UPDATED; 211 status = NEARLY_UPDATED;
212 break; 212 break;
213 } 213 }
214 case UPGRADE_ERROR: { 214 case UPGRADE_ERROR: {
215 content::RecordAction(UserMetricsAction("UpgradeCheck_Error")); 215 content::RecordAction(UserMetricsAction("UpgradeCheck_Error"));
216 status = FAILED; 216 status = FAILED;
217 if (error_code != GOOGLE_UPDATE_DISABLED_BY_POLICY) { 217 if (error_code == GOOGLE_UPDATE_DISABLED_BY_POLICY) {
218 message =
219 l10n_util::GetStringUTF16(IDS_UPGRADE_DISABLED_BY_POLICY);
220 } else if (error_code == GOOGLE_UPDATE_DISABLED_BY_POLICY_AUTO_ONLY) {
221 message =
222 l10n_util::GetStringUTF16(IDS_UPGRADE_DISABLED_BY_POLICY_MANUAL);
223 } else {
218 message = 224 message =
219 l10n_util::GetStringFUTF16Int(IDS_UPGRADE_ERROR, error_code); 225 l10n_util::GetStringFUTF16Int(IDS_UPGRADE_ERROR, error_code);
220 } else {
221 message =
222 l10n_util::GetStringUTF16(IDS_UPGRADE_DISABLED_BY_POLICY);
223 } 226 }
227
224 if (!error_message.empty()) { 228 if (!error_message.empty()) {
225 message += 229 message +=
226 l10n_util::GetStringFUTF16(IDS_ABOUT_BOX_ERROR_DURING_UPDATE_CHECK, 230 l10n_util::GetStringFUTF16(IDS_ABOUT_BOX_ERROR_DURING_UPDATE_CHECK,
227 error_message); 231 error_message);
228 } 232 }
229 break; 233 break;
230 } 234 }
231 } 235 }
232 236
233 // TODO(mad): Get proper progress value instead of passing 0. 237 // TODO(mad): Get proper progress value instead of passing 0.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 << GetCurrentThreadId(); 298 << GetCurrentThreadId();
295 #endif 299 #endif
296 return window; 300 return window;
297 } 301 }
298 302
299 } // namespace 303 } // namespace
300 304
301 VersionUpdater* VersionUpdater::Create() { 305 VersionUpdater* VersionUpdater::Create() {
302 return new VersionUpdaterWin; 306 return new VersionUpdaterWin;
303 } 307 }
OLDNEW
« no previous file with comments | « chrome/browser/google/google_update_win.cc ('k') | chrome/installer/util/google_update_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698