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

Side by Side Diff: chrome/browser/ui/webui/options/certificate_manager_handler.cc

Issue 376753002: Fix webui cert viewer showing wrong cert chain on NSS and no chain on OpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 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 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 "chrome/browser/ui/webui/options/certificate_manager_handler.h" 5 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 l10n_util::GetStringUTF8(IDS_CERT_MANAGER_CA_IMPORT_ERROR_TITLE), 976 l10n_util::GetStringUTF8(IDS_CERT_MANAGER_CA_IMPORT_ERROR_TITLE),
977 not_imported); 977 not_imported);
978 } 978 }
979 ImportExportCleanup(); 979 ImportExportCleanup();
980 } 980 }
981 981
982 void CertificateManagerHandler::Export(const base::ListValue* args) { 982 void CertificateManagerHandler::Export(const base::ListValue* args) {
983 net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args); 983 net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args);
984 if (!cert) 984 if (!cert)
985 return; 985 return;
986 ShowCertExportDialog(web_ui()->GetWebContents(), GetParentWindow(), 986 ShowCertExportDialog(web_ui()->GetWebContents(), GetParentWindow(), cert);
987 cert->os_cert_handle());
988 } 987 }
989 988
990 void CertificateManagerHandler::Delete(const base::ListValue* args) { 989 void CertificateManagerHandler::Delete(const base::ListValue* args) {
991 net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args); 990 net::X509Certificate* cert = cert_id_map_->CallbackArgsToCert(args);
992 if (!cert) 991 if (!cert)
993 return; 992 return;
994 bool result = certificate_manager_model_->Delete(cert); 993 bool result = certificate_manager_model_->Delete(cert);
995 if (!result) { 994 if (!result) {
996 // TODO(mattm): better error messages? 995 // TODO(mattm): better error messages?
997 ShowError( 996 ShowError(
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 title_value, 1149 title_value,
1151 error_value, 1150 error_value,
1152 cert_error_list); 1151 cert_error_list);
1153 } 1152 }
1154 1153
1155 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1154 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1156 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); 1155 return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
1157 } 1156 }
1158 1157
1159 } // namespace options 1158 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698