OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/chromeos/policy/cloud_external_data_policy_observer.h" | 5 #include "chrome/browser/chromeos/policy/cloud_external_data_policy_observer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/message_loop/message_loop_proxy.h" | 15 #include "base/message_loop/message_loop_proxy.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
19 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
20 #include "chrome/browser/chromeos/login/fake_user_manager.h" | 20 #include "chrome/browser/chromeos/login/fake_user_manager.h" |
21 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_u
til.h" | 21 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_u
til.h" |
22 #include "chrome/browser/chromeos/policy/device_local_account.h" | 22 #include "chrome/browser/chromeos/policy/device_local_account.h" |
23 #include "chrome/browser/chromeos/policy/device_local_account_external_data_mana
ger.h" | 23 #include "chrome/browser/chromeos/policy/device_local_account_external_data_mana
ger.h" |
24 #include "chrome/browser/chromeos/policy/device_local_account_policy_provider.h" | 24 #include "chrome/browser/chromeos/policy/device_local_account_policy_provider.h" |
25 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" | 25 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
| 26 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
26 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 27 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
27 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 28 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
28 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" | |
29 #include "chrome/browser/profiles/profile.h" | 29 #include "chrome/browser/profiles/profile.h" |
30 #include "chrome/common/chrome_paths.h" | 30 #include "chrome/common/chrome_paths.h" |
31 #include "chrome/test/base/testing_profile.h" | 31 #include "chrome/test/base/testing_profile.h" |
32 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 32 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
33 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 33 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
34 #include "components/policy/core/common/cloud/mock_cloud_external_data_manager.h
" | 34 #include "components/policy/core/common/cloud/mock_cloud_external_data_manager.h
" |
35 #include "components/policy/core/common/cloud/policy_builder.h" | 35 #include "components/policy/core/common/cloud/policy_builder.h" |
36 #include "components/policy/core/common/external_data_fetcher.h" | 36 #include "components/policy/core/common/external_data_fetcher.h" |
37 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 37 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
38 #include "components/policy/core/common/policy_map.h" | 38 #include "components/policy/core/common/policy_map.h" |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 | 937 |
938 EXPECT_TRUE(set_calls_.empty()); | 938 EXPECT_TRUE(set_calls_.empty()); |
939 EXPECT_TRUE(cleared_calls_.empty()); | 939 EXPECT_TRUE(cleared_calls_.empty()); |
940 ASSERT_EQ(1u, fetched_calls_.size()); | 940 ASSERT_EQ(1u, fetched_calls_.size()); |
941 EXPECT_EQ(kRegularUserID, fetched_calls_.front().first); | 941 EXPECT_EQ(kRegularUserID, fetched_calls_.front().first); |
942 EXPECT_EQ(avatar_policy_2_data_, fetched_calls_.front().second); | 942 EXPECT_EQ(avatar_policy_2_data_, fetched_calls_.front().second); |
943 ClearObservations(); | 943 ClearObservations(); |
944 } | 944 } |
945 | 945 |
946 } // namespace policy | 946 } // namespace policy |
OLD | NEW |