summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-21 02:56:58 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-21 02:56:58 +0000
commitf245542e9805530611a6ce4f594e9a1d71b195f8 (patch)
tree45bef210fefc64d205858bfdca47a478839cb268 /content/browser
parent67d2d80c1505fe6ba82124b2cc1d37d0764e0048 (diff)
downloadchromium_src-f245542e9805530611a6ce4f594e9a1d71b195f8.zip
chromium_src-f245542e9805530611a6ce4f594e9a1d71b195f8.tar.gz
chromium_src-f245542e9805530611a6ce4f594e9a1d71b195f8.tar.bz2
Win: Replace native modal cert selector dialog with Views tab constrained implementation.
Handle the "multiple tabs requesting certs for same site" issue. BUG=73223,50710 TEST=Try some sites that use SSL client auth. See bug 73223 for multiple-tabs issue. Review URL: http://codereview.chromium.org/7362008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/ssl/ssl_client_auth_handler.h7
-rw-r--r--content/browser/ssl/ssl_client_auth_handler_mock.h23
2 files changed, 27 insertions, 3 deletions
diff --git a/content/browser/ssl/ssl_client_auth_handler.h b/content/browser/ssl/ssl_client_auth_handler.h
index 404b8d2..4dbcaa7 100644
--- a/content/browser/ssl/ssl_client_auth_handler.h
+++ b/content/browser/ssl/ssl_client_auth_handler.h
@@ -46,17 +46,18 @@ class SSLClientAuthHandler
// Like CertificateSelected, but does not send SSL_CLIENT_AUTH_CERT_SELECTED
// notification. Used to avoid notification re-spamming when other
// certificate selectors act on a notification matching the same host.
- void CertificateSelectedNoNotify(net::X509Certificate* cert);
+ virtual void CertificateSelectedNoNotify(net::X509Certificate* cert);
// Returns the SSLCertRequestInfo for this handler.
net::SSLCertRequestInfo* cert_request_info() { return cert_request_info_; }
+ protected:
+ virtual ~SSLClientAuthHandler();
+
private:
friend class BrowserThread;
friend class DeleteTask<SSLClientAuthHandler>;
- virtual ~SSLClientAuthHandler();
-
// Notifies that the user has selected a cert.
// Called on the IO thread.
void DoCertificateSelected(net::X509Certificate* cert);
diff --git a/content/browser/ssl/ssl_client_auth_handler_mock.h b/content/browser/ssl/ssl_client_auth_handler_mock.h
new file mode 100644
index 0000000..4ebb6f0
--- /dev/null
+++ b/content/browser/ssl/ssl_client_auth_handler_mock.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_MOCK_H_
+#define CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_MOCK_H_
+#pragma once
+
+#include "content/browser/ssl/ssl_client_auth_handler.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+class SSLClientAuthHandlerMock : public SSLClientAuthHandler {
+ public:
+ SSLClientAuthHandlerMock(
+ net::URLRequest* request,
+ net::SSLCertRequestInfo* cert_request_info)
+ : SSLClientAuthHandler(request, cert_request_info) {
+ }
+ MOCK_METHOD1(CertificateSelectedNoNotify, void(net::X509Certificate* cert));
+};
+
+
+#endif // CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_MOCK_H_