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

Unified Diff: chrome/browser/ui/webui/help/version_updater_win.cc

Issue 1214603005: Simplify update error message support HTML. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment improvement Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/google/google_update_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/help/version_updater_win.cc
diff --git a/chrome/browser/ui/webui/help/version_updater_win.cc b/chrome/browser/ui/webui/help/version_updater_win.cc
index b62c7afed5bf1c694509b0dbbbf7b9ff55c952c1..f0f0d0219f928ef3f1dfc8e898974bac01fd07d8 100644
--- a/chrome/browser/ui/webui/help/version_updater_win.cc
+++ b/chrome/browser/ui/webui/help/version_updater_win.cc
@@ -42,7 +42,7 @@ class VersionUpdaterWin : public VersionUpdater, public UpdateCheckDelegate {
const base::string16& new_version) override;
void OnUpgradeComplete(const base::string16& new_version) override;
void OnError(GoogleUpdateErrorCode error_code,
- const base::string16& error_message,
+ const base::string16& html_error_message,
const base::string16& new_version) override;
private:
@@ -132,20 +132,17 @@ void VersionUpdaterWin::OnUpgradeComplete(const base::string16& new_version) {
}
void VersionUpdaterWin::OnError(GoogleUpdateErrorCode error_code,
- const base::string16& error_message,
+ const base::string16& html_error_message,
const base::string16& new_version) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
base::string16 message;
- // Current versions of Google Update provide a nice message for the policy
- // case. Use this generic error for the policy case only if no message from
- // Google Update is present.
- if (error_code != GOOGLE_UPDATE_DISABLED_BY_POLICY || error_message.empty())
+ // html_error_message already mentions error_code so don't combine messages.
+ if (html_error_message.empty()) {
message = l10n_util::GetStringFUTF16Int(IDS_UPGRADE_ERROR, error_code);
-
- if (!error_message.empty()) {
- message += l10n_util::GetStringFUTF16(
- IDS_ABOUT_BOX_ERROR_DURING_UPDATE_CHECK, error_message);
+ } else {
+ message = l10n_util::GetStringFUTF16(
+ IDS_ABOUT_BOX_ERROR_DURING_UPDATE_CHECK, html_error_message);
}
callback_.Run(FAILED, 0, message);
}
« no previous file with comments | « chrome/browser/google/google_update_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698