OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/device_local_account_policy_service.h" | 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
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/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/message_loop/message_loop_proxy.h" | 14 #include "base/message_loop/message_loop_proxy.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/test/scoped_path_override.h" | 19 #include "base/test/scoped_path_override.h" |
20 #include "base/test/test_simple_task_runner.h" | 20 #include "base/test/test_simple_task_runner.h" |
21 #include "chrome/browser/chromeos/policy/device_local_account.h" | 21 #include "chrome/browser/chromeos/policy/device_local_account.h" |
22 #include "chrome/browser/chromeos/policy/device_local_account_policy_provider.h" | 22 #include "chrome/browser/chromeos/policy/device_local_account_policy_provider.h" |
23 #include "chrome/browser/chromeos/settings/cros_settings.h" | 23 #include "chrome/browser/chromeos/settings/cros_settings.h" |
24 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 24 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
25 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 25 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
26 #include "chrome/browser/policy/cloud/cloud_policy_client.h" | |
27 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | |
28 #include "chrome/browser/policy/cloud/cloud_policy_service.h" | |
29 #include "chrome/browser/policy/cloud/mock_device_management_service.h" | |
30 #include "chrome/browser/policy/cloud/policy_builder.h" | |
31 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" | 26 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" |
32 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
33 #include "chromeos/chromeos_paths.h" | 28 #include "chromeos/chromeos_paths.h" |
34 #include "chromeos/dbus/power_policy_controller.h" | 29 #include "chromeos/dbus/power_policy_controller.h" |
| 30 #include "components/policy/core/common/cloud/cloud_policy_client.h" |
| 31 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 32 #include "components/policy/core/common/cloud/cloud_policy_service.h" |
| 33 #include "components/policy/core/common/cloud/mock_device_management_service.h" |
| 34 #include "components/policy/core/common/cloud/policy_builder.h" |
35 #include "components/policy/core/common/external_data_fetcher.h" | 35 #include "components/policy/core/common/external_data_fetcher.h" |
36 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 36 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
37 #include "components/policy/core/common/schema_registry.h" | 37 #include "components/policy/core/common/schema_registry.h" |
38 #include "net/url_request/url_request_context_getter.h" | 38 #include "net/url_request/url_request_context_getter.h" |
39 #include "net/url_request/url_request_test_util.h" | 39 #include "net/url_request/url_request_test_util.h" |
40 #include "policy/policy_constants.h" | 40 #include "policy/policy_constants.h" |
41 #include "policy/proto/cloud_policy.pb.h" | 41 #include "policy/proto/cloud_policy.pb.h" |
42 #include "testing/gtest/include/gtest/gtest.h" | 42 #include "testing/gtest/include/gtest/gtest.h" |
43 | 43 |
44 using testing::AnyNumber; | 44 using testing::AnyNumber; |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 em::DeviceManagementResponse response; | 944 em::DeviceManagementResponse response; |
945 device_local_account_policy_.Build(); | 945 device_local_account_policy_.Build(); |
946 response.mutable_policy_response()->add_response()->CopyFrom( | 946 response.mutable_policy_response()->add_response()->CopyFrom( |
947 device_local_account_policy_.policy()); | 947 device_local_account_policy_.policy()); |
948 request_job->SendResponse(DM_STATUS_SUCCESS, response); | 948 request_job->SendResponse(DM_STATUS_SUCCESS, response); |
949 FlushDeviceSettings(); | 949 FlushDeviceSettings(); |
950 Mock::VerifyAndClearExpectations(&provider_observer_); | 950 Mock::VerifyAndClearExpectations(&provider_observer_); |
951 } | 951 } |
952 | 952 |
953 } // namespace policy | 953 } // namespace policy |
OLD | NEW |