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

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: fix aura 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
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
Avi (use Gerrit) 2012/02/13 20:10:37 "Requestor" is not English. Yet http://code.google
jam 2012/02/13 20:59:00 I didn't think about it that much :) It looks like
+ : 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

Powered by Google App Engine
This is Rietveld 408576698