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 "chrome/browser/policy/cloud/component_cloud_policy_store.h" | 5 #include "chrome/browser/policy/cloud/component_cloud_policy_store.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/sha1.h" | 14 #include "base/sha1.h" |
15 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | 15 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" |
16 #include "chrome/browser/policy/cloud/policy_builder.h" | 16 #include "chrome/browser/policy/cloud/policy_builder.h" |
17 #include "chrome/browser/policy/cloud/proto/chrome_extension_policy.pb.h" | |
18 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h" | |
19 #include "chrome/browser/policy/cloud/resource_cache.h" | 17 #include "chrome/browser/policy/cloud/resource_cache.h" |
| 18 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" |
| 19 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 namespace em = enterprise_management; | 23 namespace em = enterprise_management; |
24 | 24 |
25 using testing::Mock; | 25 using testing::Mock; |
26 | 26 |
27 namespace policy { | 27 namespace policy { |
28 | 28 |
29 namespace { | 29 namespace { |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 305 |
306 // And they aren't loaded anymore either. | 306 // And they aren't loaded anymore either. |
307 ComponentCloudPolicyStore yet_another_store(&store_delegate_, cache_.get()); | 307 ComponentCloudPolicyStore yet_another_store(&store_delegate_, cache_.get()); |
308 yet_another_store.SetCredentials(ComponentPolicyBuilder::kFakeUsername, | 308 yet_another_store.SetCredentials(ComponentPolicyBuilder::kFakeUsername, |
309 ComponentPolicyBuilder::kFakeToken); | 309 ComponentPolicyBuilder::kFakeToken); |
310 yet_another_store.Load(); | 310 yet_another_store.Load(); |
311 EXPECT_TRUE(yet_another_store.policy().Equals(empty_bundle)); | 311 EXPECT_TRUE(yet_another_store.policy().Equals(empty_bundle)); |
312 } | 312 } |
313 | 313 |
314 } // namespace policy | 314 } // namespace policy |
OLD | NEW |