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

Unified Diff: chrome/browser/ssl/ssl_client_auth_requestor_mock.h

Issue 9384014: Remove knowledge about SSLClientAuthHandler from chrome. Instead a callback is given to the embed... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments+sync Created 8 years, 10 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/ssl/ssl_client_auth_observer.cc ('k') | chrome/browser/ssl_client_certificate_selector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_client_auth_requestor_mock.h
===================================================================
--- chrome/browser/ssl/ssl_client_auth_requestor_mock.h (revision 0)
+++ chrome/browser/ssl/ssl_client_auth_requestor_mock.h (revision 0)
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 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 CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_REQUESTOR_MOCK_H_
+#define CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_REQUESTOR_MOCK_H_
+#pragma once
+
+#include "base/memory/ref_counted.h"
+#include "net/http/http_transaction_factory.h"
+#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_context.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace net {
+class SSLCertRequestInfo;
+class X509Certificate;
+}
+
+class SSLClientAuthRequestorMock
+ : public base::RefCountedThreadSafe<SSLClientAuthRequestorMock> {
+ public:
+ SSLClientAuthRequestorMock(
+ net::URLRequest* request,
+ net::SSLCertRequestInfo* cert_request_info)
+ : cert_request_info_(cert_request_info),
+ http_network_session_(
+ request->context()->http_transaction_factory()->GetSession()) {
+ }
+ // NOTE: we need a vtable or else gmock blows up.
+ virtual ~SSLClientAuthRequestorMock() {
+ }
+
+ MOCK_METHOD1(CertificateSelected, void(net::X509Certificate* cert));
+
+ net::SSLCertRequestInfo* cert_request_info_;
+ net::HttpNetworkSession* http_network_session_;
+};
+
+#endif // CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_REQUESTOR_MOCK_H_
Property changes on: chrome\browser\ssl\ssl_client_auth_requestor_mock.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/ssl/ssl_client_auth_observer.cc ('k') | chrome/browser/ssl_client_certificate_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698