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/settings/device_settings_service.h" | 26 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
27 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 27 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
28 #include "chrome/browser/policy/cloud/cloud_policy_core.h" | |
29 #include "chrome/browser/policy/cloud/cloud_policy_store.h" | |
30 #include "chrome/browser/policy/cloud/mock_cloud_external_data_manager.h" | |
31 #include "chrome/browser/policy/cloud/policy_builder.h" | |
32 #include "chrome/browser/policy/policy_service.h" | |
33 #include "chrome/browser/policy/policy_service_impl.h" | |
34 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" | 28 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" |
35 #include "chrome/browser/profiles/profile.h" | 29 #include "chrome/browser/profiles/profile.h" |
36 #include "chrome/common/chrome_paths.h" | 30 #include "chrome/common/chrome_paths.h" |
37 #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" |
| 33 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 34 #include "components/policy/core/common/cloud/mock_cloud_external_data_manager.h
" |
| 35 #include "components/policy/core/common/cloud/policy_builder.h" |
38 #include "components/policy/core/common/external_data_fetcher.h" | 36 #include "components/policy/core/common/external_data_fetcher.h" |
39 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 37 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
40 #include "components/policy/core/common/policy_map.h" | 38 #include "components/policy/core/common/policy_map.h" |
| 39 #include "components/policy/core/common/policy_service.h" |
| 40 #include "components/policy/core/common/policy_service_impl.h" |
41 #include "components/policy/core/common/policy_types.h" | 41 #include "components/policy/core/common/policy_types.h" |
42 #include "content/public/browser/notification_details.h" | 42 #include "content/public/browser/notification_details.h" |
43 #include "content/public/browser/notification_service.h" | 43 #include "content/public/browser/notification_service.h" |
44 #include "content/public/browser/notification_source.h" | 44 #include "content/public/browser/notification_source.h" |
45 #include "net/url_request/test_url_fetcher_factory.h" | 45 #include "net/url_request/test_url_fetcher_factory.h" |
46 #include "net/url_request/url_fetcher_delegate.h" | 46 #include "net/url_request/url_fetcher_delegate.h" |
47 #include "net/url_request/url_request_context_getter.h" | 47 #include "net/url_request/url_request_context_getter.h" |
48 #include "net/url_request/url_request_status.h" | 48 #include "net/url_request/url_request_status.h" |
49 #include "policy/policy_constants.h" | 49 #include "policy/policy_constants.h" |
50 #include "policy/proto/cloud_policy.pb.h" | 50 #include "policy/proto/cloud_policy.pb.h" |
(...skipping 886 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 |