| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "components/policy/core/common/cloud/component_cloud_policy_store.h" | 5 #include "components/policy/core/common/cloud/component_cloud_policy_store.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/sha1.h" | 15 #include "base/sha1.h" |
| 16 #include "base/test/test_simple_task_runner.h" | 16 #include "base/test/test_simple_task_runner.h" |
| 17 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" | |
| 18 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" | |
| 19 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 17 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 20 #include "components/policy/core/common/cloud/policy_builder.h" | 18 #include "components/policy/core/common/cloud/policy_builder.h" |
| 21 #include "components/policy/core/common/cloud/resource_cache.h" | 19 #include "components/policy/core/common/cloud/resource_cache.h" |
| 22 #include "components/policy/core/common/external_data_fetcher.h" | 20 #include "components/policy/core/common/external_data_fetcher.h" |
| 21 #include "policy/proto/chrome_extension_policy.pb.h" |
| 22 #include "policy/proto/device_management_backend.pb.h" |
| 23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 | 25 |
| 26 namespace em = enterprise_management; | 26 namespace em = enterprise_management; |
| 27 | 27 |
| 28 using testing::Mock; | 28 using testing::Mock; |
| 29 | 29 |
| 30 namespace policy { | 30 namespace policy { |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 316 |
| 317 // And they aren't loaded anymore either. | 317 // And they aren't loaded anymore either. |
| 318 ComponentCloudPolicyStore yet_another_store(&store_delegate_, cache_.get()); | 318 ComponentCloudPolicyStore yet_another_store(&store_delegate_, cache_.get()); |
| 319 yet_another_store.SetCredentials(ComponentPolicyBuilder::kFakeUsername, | 319 yet_another_store.SetCredentials(ComponentPolicyBuilder::kFakeUsername, |
| 320 ComponentPolicyBuilder::kFakeToken); | 320 ComponentPolicyBuilder::kFakeToken); |
| 321 yet_another_store.Load(); | 321 yet_another_store.Load(); |
| 322 EXPECT_TRUE(yet_another_store.policy().Equals(empty_bundle)); | 322 EXPECT_TRUE(yet_another_store.policy().Equals(empty_bundle)); |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace policy | 325 } // namespace policy |
| OLD | NEW |