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

Unified Diff: chrome/browser/policy/profile_policy_connector_unittest.cc

Issue 762863002: Removed policy::PolicyNamespaceKey. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass values in ctors 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/policy/profile_policy_connector_unittest.cc
diff --git a/chrome/browser/policy/profile_policy_connector_unittest.cc b/chrome/browser/policy/profile_policy_connector_unittest.cc
index 2c7f553263a9c9d1c98dc52488843dc1c195edde..cfbb57d89bf53cc203870316395f475dac186afd 100644
--- a/chrome/browser/policy/profile_policy_connector_unittest.cc
+++ b/chrome/browser/policy/profile_policy_connector_unittest.cc
@@ -41,7 +41,8 @@ class ProfilePolicyConnectorTest : public testing::Test {
cloud_policy_store_.NotifyStoreLoaded();
cloud_policy_manager_.reset(
- new CloudPolicyManager(PolicyNamespaceKey("", ""),
+ new CloudPolicyManager(std::string(),
+ std::string(),
&cloud_policy_store_,
loop_.message_loop_proxy(),
loop_.message_loop_proxy(),
@@ -49,7 +50,7 @@ class ProfilePolicyConnectorTest : public testing::Test {
}
void TearDown() override {
- TestingBrowserProcess::GetGlobal()->SetBrowserPolicyConnector(NULL);
+ TestingBrowserProcess::GetGlobal()->SetBrowserPolicyConnector(nullptr);
cloud_policy_manager_->Shutdown();
}
@@ -64,7 +65,7 @@ TEST_F(ProfilePolicyConnectorTest, IsPolicyFromCloudPolicy) {
ProfilePolicyConnector connector;
connector.Init(false,
#if defined(OS_CHROMEOS)
- NULL,
+ nullptr,
#endif
&schema_registry_,
cloud_policy_manager_.get());
@@ -72,7 +73,7 @@ TEST_F(ProfilePolicyConnectorTest, IsPolicyFromCloudPolicy) {
// No policy is set initially.
EXPECT_FALSE(
connector.IsPolicyFromCloudPolicy(autofill::prefs::kAutofillEnabled));
- PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, "");
+ PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, std::string());
EXPECT_FALSE(connector.policy_service()->GetPolicies(chrome_ns).GetValue(
key::kAutoFillEnabled));
@@ -81,7 +82,7 @@ TEST_F(ProfilePolicyConnectorTest, IsPolicyFromCloudPolicy) {
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
new base::FundamentalValue(false),
- NULL);
+ nullptr);
cloud_policy_store_.NotifyStoreLoaded();
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(connector.IsPolicyFromCloudPolicy(key::kAutoFillEnabled));
@@ -97,7 +98,7 @@ TEST_F(ProfilePolicyConnectorTest, IsPolicyFromCloudPolicy) {
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
new base::FundamentalValue(true),
- NULL);
+ nullptr);
mock_provider_.UpdateChromePolicy(map);
EXPECT_FALSE(connector.IsPolicyFromCloudPolicy(key::kAutoFillEnabled));
value = connector.policy_service()->GetPolicies(chrome_ns).GetValue(

Powered by Google App Engine
This is Rietveld 408576698