| Index: components/policy/core/common/cloud/cloud_policy_manager_unittest.cc
|
| diff --git a/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc b/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc
|
| index 70299fa3f53ca5153b94be474950ca0caf86d3c0..9e9c96e710b1fdeec1f716a98e5b50c134f1efe9 100644
|
| --- a/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc
|
| +++ b/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc
|
| @@ -75,7 +75,7 @@ ConfigurationPolicyProvider* TestHarness::CreateProvider(
|
| // Create and initialize the store.
|
| store_.NotifyStoreLoaded();
|
| ConfigurationPolicyProvider* provider = new CloudPolicyManager(
|
| - PolicyNamespaceKey(dm_protocol::kChromeUserPolicyType, std::string()),
|
| + dm_protocol::kChromeUserPolicyType,
|
| &store_,
|
| task_runner,
|
| task_runner,
|
| @@ -148,9 +148,7 @@ class TestCloudPolicyManager : public CloudPolicyManager {
|
| TestCloudPolicyManager(
|
| CloudPolicyStore* store,
|
| const scoped_refptr<base::SequencedTaskRunner>& task_runner)
|
| - : CloudPolicyManager(PolicyNamespaceKey(
|
| - dm_protocol::kChromeUserPolicyType,
|
| - std::string()),
|
| + : CloudPolicyManager(dm_protocol::kChromeUserPolicyType,
|
| store,
|
| task_runner,
|
| task_runner,
|
| @@ -174,7 +172,7 @@ MATCHER_P(ProtoMatches, proto, "") {
|
| class CloudPolicyManagerTest : public testing::Test {
|
| protected:
|
| CloudPolicyManagerTest()
|
| - : policy_ns_key_(dm_protocol::kChromeUserPolicyType, std::string()) {}
|
| + : policy_type_(dm_protocol::kChromeUserPolicyType) {}
|
|
|
| void SetUp() override {
|
| // Set up a policy map for testing.
|
| @@ -206,7 +204,7 @@ class CloudPolicyManagerTest : public testing::Test {
|
| base::MessageLoop loop_;
|
|
|
| // Testing policy.
|
| - const PolicyNamespaceKey policy_ns_key_;
|
| + const std::string policy_type_;
|
| UserPolicyBuilder policy_;
|
| PolicyMap policy_map_;
|
| PolicyBundle expected_bundle_;
|
| @@ -266,7 +264,7 @@ TEST_F(CloudPolicyManagerTest, RegistrationAndFetch) {
|
| client->SetDMToken(policy_.policy_data().request_token());
|
| client->NotifyRegistrationStateChanged();
|
|
|
| - client->SetPolicy(policy_ns_key_, policy_.policy());
|
| + client->SetPolicy(policy_type_, "", policy_.policy());
|
| EXPECT_CALL(store_, Store(ProtoMatches(policy_.policy())));
|
| client->NotifyPolicyFetched();
|
| Mock::VerifyAndClearExpectations(&store_);
|
| @@ -339,7 +337,7 @@ TEST_F(CloudPolicyManagerTest, RefreshSuccessful) {
|
| // Respond to the policy fetch, which should trigger a write to |store_|.
|
| EXPECT_CALL(observer_, OnUpdatePolicy(_)).Times(0);
|
| EXPECT_CALL(store_, Store(_));
|
| - client->SetPolicy(policy_ns_key_, policy_.policy());
|
| + client->SetPolicy(policy_type_, "", policy_.policy());
|
| client->NotifyPolicyFetched();
|
| Mock::VerifyAndClearExpectations(&observer_);
|
| Mock::VerifyAndClearExpectations(&store_);
|
|
|