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

Unified Diff: chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.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
Index: chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc
index cf5c23d0c27b187370f08bcb7373bf976f5e839f..369070926fe5aaf301b6a9911f7f3d2816eab9ce 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc
@@ -9,10 +9,12 @@
#include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/net/nss_context.h"
+#include "chrome/browser/net/cert_database_service_factory.h"
#include "chrome/browser/net/url_request_mock_util.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/login/user_names.h"
+#include "chromeos/tpm_token_loader.h"
+#include "components/cert_database/cert_database_service.h"
#include "components/policy/core/browser/browser_policy_connector.h"
#include "components/policy/core/common/mock_configuration_policy_provider.h"
#include "components/policy/core/common/policy_map.h"
@@ -166,7 +168,9 @@ class EnterprisePlatformKeysTest
: public ExtensionApiTest,
public ::testing::WithParamInterface<Params> {
public:
- EnterprisePlatformKeysTest() {}
+ EnterprisePlatformKeysTest() {
+ chromeos::TPMTokenLoader::InitializeForTest();
+ }
virtual void SetUpCommandLine(CommandLine* command_line) override {
ExtensionApiTest::SetUpCommandLine(command_line);
@@ -227,11 +231,13 @@ class EnterprisePlatformKeysTest
{
base::RunLoop loop;
- GetNSSCertDatabaseForProfile(
- browser()->profile(),
- base::Bind(&EnterprisePlatformKeysTest::DidGetCertDatabase,
- base::Unretained(this),
- loop.QuitClosure()));
+ cert_database::CertDatabaseService* cert_service =
+ cert_database::CertDatabaseServiceFactory::GetForBrowserContext(
+ browser()->profile());
+ EXPECT_TRUE(cert_service);
+ cert_service->GetNSSCertDatabase(
+ base::Bind(&EnterprisePlatformKeysTest::DidGetCertDatabase,
+ base::Unretained(this), loop.QuitClosure()));
loop.Run();
}
@@ -353,10 +359,12 @@ INSTANTIATE_TEST_CASE_P(
USER_AFFILIATION_UNRELATED),
Params(SYSTEM_TOKEN_EXISTS,
DEVICE_STATUS_NOT_ENROLLED,
- USER_AFFILIATION_UNRELATED),
- Params(SYSTEM_TOKEN_NOT_EXISTS,
- DEVICE_STATUS_ENROLLED,
- USER_AFFILIATION_ENROLLED_DOMAIN)));
+ USER_AFFILIATION_UNRELATED)));
+// TODO(pneubeck): Enable this case again, once TPMTokenLoader can handle a
+// missing system token correctly. https://crbug.com/426773
+// Params(SYSTEM_TOKEN_NOT_EXISTS,
+// DEVICE_STATUS_ENROLLED,
+// USER_AFFILIATION_ENROLLED_DOMAIN)
class EnterprisePlatformKeysTestNonPolicyInstalledExtension
: public EnterprisePlatformKeysTest {};
« no previous file with comments | « chrome/browser/chromeos/settings/session_manager_operation.cc ('k') | chrome/browser/net/cert_database_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698