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

Unified Diff: chrome/browser/ssl/ssl_add_cert_handler.cc

Issue 2859026: Display the error code when certificates fail to add (Closed)
Patch Set: Show the stringified error code Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_add_cert_handler.cc
diff --git a/chrome/browser/ssl/ssl_add_cert_handler.cc b/chrome/browser/ssl/ssl_add_cert_handler.cc
index dafc78fa0afcbc358f5ecc60e7ce0c0d9bcf3724..691e8773a1099ca0aa03eb44eaa6234b09095d65 100644
--- a/chrome/browser/ssl/ssl_add_cert_handler.cc
+++ b/chrome/browser/ssl/ssl_add_cert_handler.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ssl/ssl_add_cert_handler.h"
#include "app/l10n_util.h"
+#include "base/string_util.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_window.h"
@@ -34,7 +35,10 @@ void SSLAddCertHandler::RunUI() {
}
if (cert_error != net::OK) {
// TODO(snej): Map cert_error to a more specific error message.
- ShowError(l10n_util::GetStringUTF16(IDS_ADD_CERT_ERR_INVALID_CERT));
+ ShowError(l10n_util::GetStringFUTF16(
+ IDS_ADD_CERT_ERR_INVALID_CERT,
+ IntToString16(-cert_error),
+ ASCIIToUTF16(net::ErrorToString(cert_error))));
Finished(false);
return;
}
@@ -54,7 +58,10 @@ void SSLAddCertHandler::Finished(bool add_cert) {
int cert_error = db.AddUserCert(cert_);
if (cert_error != net::OK) {
// TODO(snej): Map cert_error to a more specific error message.
- ShowError(l10n_util::GetStringUTF16(IDS_ADD_CERT_ERR_FAILED));
+ ShowError(l10n_util::GetStringFUTF16(
+ IDS_ADD_CERT_ERR_FAILED,
+ IntToString16(-cert_error),
+ ASCIIToUTF16(net::ErrorToString(cert_error))));
}
}
Release();
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698