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

Unified Diff: chrome/browser/ui/views/certificate_selector.h

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: rebase Created 3 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
Index: chrome/browser/ui/views/certificate_selector.h
diff --git a/chrome/browser/ui/views/certificate_selector.h b/chrome/browser/ui/views/certificate_selector.h
index 5eb701a2287e5370db51f3151a33619944f490f3..d0b4467351fe42a7400d9eba11bb7d2006cec303 100644
--- a/chrome/browser/ui/views/certificate_selector.h
+++ b/chrome/browser/ui/views/certificate_selector.h
@@ -9,7 +9,7 @@
#include "base/macros.h"
#include "base/strings/string16.h"
-#include "net/cert/x509_certificate.h"
+#include "net/ssl/client_cert_identity.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/table/table_view_observer.h"
#include "ui/views/window/dialog_delegate.h"
@@ -45,13 +45,17 @@ class CertificateSelector : public views::DialogDelegateView,
static bool CanShow(content::WebContents* web_contents);
// |web_contents| must not be null.
- CertificateSelector(const net::CertificateList& certificates,
+ CertificateSelector(net::ClientCertIdentityList identities,
content::WebContents* web_contents);
~CertificateSelector() override;
// Returns the currently selected certificate or null if none is selected.
// Must be called after |InitWithText()|.
- net::X509Certificate* GetSelectedCert() const;
+ net::ClientCertIdentity* GetSelectedCert() const;
+
+ // Take ownership of the currently selected certificate or null if none is
Peter Kasting 2017/06/15 22:13:41 Nit: Take -> Takes (see note about imperative comm
mattm 2017/06/16 03:30:42 done
+ // selected. Must be called after |InitWithText()|.
Peter Kasting 2017/06/15 22:13:41 Nit: No need for || on function names (the () is t
mattm 2017/06/16 03:30:42 Acknowledged.
+ std::unique_ptr<net::ClientCertIdentity> TakeSelectedCert();
// Shows this dialog as a constrained web modal dialog and focuses the first
// certificate.
@@ -88,7 +92,7 @@ class CertificateSelector : public views::DialogDelegateView,
private:
class CertificateTableModel;
- net::CertificateList certificates_;
+ net::ClientCertIdentityList identities_;
// Whether to show the provider column in the table or not. Certificates
// provided by the platform show the empty string as provider. That column is

Powered by Google App Engine
This is Rietveld 408576698