| 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_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/prefs/pref_registry_simple.h" | |
| 17 #include "base/prefs/testing_pref_service.h" | |
| 18 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 19 #include "base/thread_task_runner_handle.h" | 17 #include "base/thread_task_runner_handle.h" |
| 20 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 18 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
| 21 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 19 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
| 22 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" | 20 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" |
| 23 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" | 21 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" |
| 24 #include "chrome/browser/chromeos/policy/enrollment_config.h" | 22 #include "chrome/browser/chromeos/policy/enrollment_config.h" |
| 25 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" | 23 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" |
| 26 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" | 24 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" |
| 27 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 25 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 40 #include "chromeos/dbus/fake_session_manager_client.h" | 38 #include "chromeos/dbus/fake_session_manager_client.h" |
| 41 #include "chromeos/system/fake_statistics_provider.h" | 39 #include "chromeos/system/fake_statistics_provider.h" |
| 42 #include "chromeos/system/statistics_provider.h" | 40 #include "chromeos/system/statistics_provider.h" |
| 43 #include "components/policy/core/common/cloud/cloud_policy_client.h" | 41 #include "components/policy/core/common/cloud/cloud_policy_client.h" |
| 44 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 42 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 45 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 43 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
| 46 #include "components/policy/core/common/cloud/mock_device_management_service.h" | 44 #include "components/policy/core/common/cloud/mock_device_management_service.h" |
| 47 #include "components/policy/core/common/external_data_fetcher.h" | 45 #include "components/policy/core/common/external_data_fetcher.h" |
| 48 #include "components/policy/core/common/policy_types.h" | 46 #include "components/policy/core/common/policy_types.h" |
| 49 #include "components/policy/core/common/schema_registry.h" | 47 #include "components/policy/core/common/schema_registry.h" |
| 48 #include "components/prefs/pref_registry_simple.h" |
| 49 #include "components/prefs/testing_pref_service.h" |
| 50 #include "google_apis/gaia/gaia_oauth_client.h" | 50 #include "google_apis/gaia/gaia_oauth_client.h" |
| 51 #include "net/url_request/test_url_fetcher_factory.h" | 51 #include "net/url_request/test_url_fetcher_factory.h" |
| 52 #include "net/url_request/url_request_test_util.h" | 52 #include "net/url_request/url_request_test_util.h" |
| 53 #include "policy/policy_constants.h" | 53 #include "policy/policy_constants.h" |
| 54 #include "policy/proto/device_management_backend.pb.h" | 54 #include "policy/proto/device_management_backend.pb.h" |
| 55 #include "testing/gmock/include/gmock/gmock.h" | 55 #include "testing/gmock/include/gmock/gmock.h" |
| 56 #include "testing/gtest/include/gtest/gtest.h" | 56 #include "testing/gtest/include/gtest/gtest.h" |
| 57 | 57 |
| 58 using testing::AnyNumber; | 58 using testing::AnyNumber; |
| 59 using testing::AtMost; | 59 using testing::AtMost; |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 | 748 |
| 749 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, | 749 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentBlankSystemSaltTest, |
| 750 RobotRefreshSaveFailed) { | 750 RobotRefreshSaveFailed) { |
| 751 // Without the system salt, the robot token can't be stored. | 751 // Without the system salt, the robot token can't be stored. |
| 752 RunTest(); | 752 RunTest(); |
| 753 ExpectFailedEnrollment(EnrollmentStatus::STATUS_ROBOT_REFRESH_STORE_FAILED); | 753 ExpectFailedEnrollment(EnrollmentStatus::STATUS_ROBOT_REFRESH_STORE_FAILED); |
| 754 } | 754 } |
| 755 | 755 |
| 756 } // namespace | 756 } // namespace |
| 757 } // namespace policy | 757 } // namespace policy |
| OLD | NEW |