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

Unified Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 419013003: Replace c/b/nss_context by a KeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Flattened components/cert_database folders. Created 6 years, 1 month 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/profiles/profile_io_data.cc ('k') | chrome/browser/ui/crypto_module_delegate_nss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_browser_tests.cc
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index e3abb4d2fe88ee0ab74394ac5c1d369b3e5d85aa..507520dc7708ae9f303932d2c2a3656ffd426901 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -47,7 +47,8 @@
#include "net/test/spawned_test_server/spawned_test_server.h"
#if defined(USE_NSS)
-#include "chrome/browser/net/nss_context.h"
+#include "chrome/browser/net/cert_database_service_factory.h"
+#include "components/cert_database/cert_database_service.h"
#include "net/base/crypto_module.h"
#include "net/cert/nss_cert_database.h"
#endif // defined(USE_NSS)
@@ -742,18 +743,22 @@ class SSLUITestWithClientCert : public SSLUITest {
SSLUITest::SetUpOnMainThread();
base::RunLoop loop;
- GetNSSCertDatabaseForProfile(
- browser()->profile(),
+ cert_database::CertDatabaseService* cert_service =
+ cert_database::CertDatabaseServiceFactory::GetForBrowserContext(
+ browser()->profile());
+ EXPECT_TRUE(cert_service);
+
+ cert_service->GetNSSCertDatabase(
base::Bind(&SSLUITestWithClientCert::DidGetCertDatabase,
- base::Unretained(this),
- &loop));
+ base::Unretained(this), loop.QuitClosure()));
loop.Run();
}
protected:
- void DidGetCertDatabase(base::RunLoop* loop, net::NSSCertDatabase* cert_db) {
+ void DidGetCertDatabase(const base::Closure& done_callback,
+ net::NSSCertDatabase* cert_db) {
cert_db_ = cert_db;
- loop->Quit();
+ done_callback.Run();
}
net::NSSCertDatabase* cert_db_;
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/ui/crypto_module_delegate_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698