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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 2848313003: Revert of Remove client_certs from SSLCertRequestInfo. (Closed)
Patch Set: Created 3 years, 7 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
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 <stddef.h> 5 #include <stddef.h>
6 #include <deque> 6 #include <deque>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 } 2245 }
2246 2246
2247 class TestClientCertStore : public net::ClientCertStore { 2247 class TestClientCertStore : public net::ClientCertStore {
2248 public: 2248 public:
2249 explicit TestClientCertStore(const net::CertificateList& certs) 2249 explicit TestClientCertStore(const net::CertificateList& certs)
2250 : certs_(certs) {} 2250 : certs_(certs) {}
2251 ~TestClientCertStore() override {} 2251 ~TestClientCertStore() override {}
2252 2252
2253 // net::ClientCertStore: 2253 // net::ClientCertStore:
2254 void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info, 2254 void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info,
2255 const ClientCertListCallback& callback) override { 2255 net::CertificateList* selected_certs,
2256 callback.Run(certs_); 2256 const base::Closure& callback) override {
2257 *selected_certs = certs_;
2258 callback.Run();
2257 } 2259 }
2258 2260
2259 private: 2261 private:
2260 net::CertificateList certs_; 2262 net::CertificateList certs_;
2261 }; 2263 };
2262 2264
2263 std::unique_ptr<net::ClientCertStore> CreateCertStore( 2265 std::unique_ptr<net::ClientCertStore> CreateCertStore(
2264 scoped_refptr<net::X509Certificate> available_cert) { 2266 scoped_refptr<net::X509Certificate> available_cert) {
2265 return std::unique_ptr<net::ClientCertStore>( 2267 return std::unique_ptr<net::ClientCertStore>(
2266 new TestClientCertStore(net::CertificateList(1, available_cert))); 2268 new TestClientCertStore(net::CertificateList(1, available_cert)));
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
3913 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, 3915 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents,
3914 "DidDisplayReallyPass()", 3916 "DidDisplayReallyPass()",
3915 &display_test_result)); 3917 &display_test_result));
3916 ASSERT_TRUE(display_test_result); 3918 ASSERT_TRUE(display_test_result);
3917 } 3919 }
3918 #endif // !defined(DISABLE_NACL) 3920 #endif // !defined(DISABLE_NACL)
3919 3921
3920 } // namespace prerender 3922 } // namespace prerender
3921 3923
3922 #endif // !defined(OS_MACOSX) || !defined(ADDRESS_SANITIZER) 3924 #endif // !defined(OS_MACOSX) || !defined(ADDRESS_SANITIZER)
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/platform_keys/platform_keys_nss.cc ('k') | chrome/browser/ssl/ssl_client_certificate_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698