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

Side by Side Diff: net/ssl/ssl_client_auth_cache_unittest.cc

Issue 2691683003: Remove OnCertDBChanged |cert| parameter. (Closed)
Patch Set: comment wording Created 3 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 unified diff | Download patch
« no previous file with comments | « net/ssl/ssl_client_auth_cache.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "net/ssl/ssl_client_auth_cache.h" 5 #include "net/ssl/ssl_client_auth_cache.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "net/cert/x509_certificate.h" 9 #include "net/cert/x509_certificate.h"
10 #include "net/ssl/ssl_private_key.h" 10 #include "net/ssl/ssl_private_key.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 scoped_refptr<X509Certificate> cached_cert; 187 scoped_refptr<X509Certificate> cached_cert;
188 scoped_refptr<SSLPrivateKey> cached_pkey; 188 scoped_refptr<SSLPrivateKey> cached_pkey;
189 189
190 // Demonstrate the set up is correct. 190 // Demonstrate the set up is correct.
191 EXPECT_TRUE(cache.Lookup(server1, &cached_cert, &cached_pkey)); 191 EXPECT_TRUE(cache.Lookup(server1, &cached_cert, &cached_pkey));
192 EXPECT_EQ(cert1, cached_cert); 192 EXPECT_EQ(cert1, cached_cert);
193 193
194 EXPECT_TRUE(cache.Lookup(server2, &cached_cert, &cached_pkey)); 194 EXPECT_TRUE(cache.Lookup(server2, &cached_cert, &cached_pkey));
195 EXPECT_EQ(nullptr, cached_cert.get()); 195 EXPECT_EQ(nullptr, cached_cert.get());
196 196
197 cache.OnCertDBChanged(nullptr); 197 cache.OnCertDBChanged();
198 198
199 // Check that we no longer have entries for either server. 199 // Check that we no longer have entries for either server.
200 EXPECT_FALSE(cache.Lookup(server1, &cached_cert, &cached_pkey)); 200 EXPECT_FALSE(cache.Lookup(server1, &cached_cert, &cached_pkey));
201 EXPECT_FALSE(cache.Lookup(server2, &cached_cert, &cached_pkey)); 201 EXPECT_FALSE(cache.Lookup(server2, &cached_cert, &cached_pkey));
202 } 202 }
203 203
204 } // namespace net 204 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_client_auth_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698