| 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/user_cloud_policy_manager_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.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/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 new base::StringValue("http://chromium.org"), | 113 new base::StringValue("http://chromium.org"), |
| 114 NULL); | 114 NULL); |
| 115 policy_map_.Set(key::kChromeOsMultiProfileUserBehavior, | 115 policy_map_.Set(key::kChromeOsMultiProfileUserBehavior, |
| 116 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 116 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
| 117 new base::StringValue("primary-only"), | 117 new base::StringValue("primary-only"), |
| 118 NULL); | 118 NULL); |
| 119 policy_map_.Set(key::kEasyUnlockAllowed, | 119 policy_map_.Set(key::kEasyUnlockAllowed, |
| 120 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, | 120 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
| 121 new base::FundamentalValue(false), | 121 new base::FundamentalValue(false), |
| 122 NULL); | 122 NULL); |
| 123 policy_map_.Set(key::kCaptivePortalAuthenticationIgnoresProxy, |
| 124 POLICY_LEVEL_MANDATORY, |
| 125 POLICY_SCOPE_USER, |
| 126 new base::FundamentalValue(false), |
| 127 NULL); |
| 123 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) | 128 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) |
| 124 .CopyFrom(policy_map_); | 129 .CopyFrom(policy_map_); |
| 125 | 130 |
| 126 // Create fake policy blobs to deliver to the client. | 131 // Create fake policy blobs to deliver to the client. |
| 127 em::DeviceRegisterResponse* register_response = | 132 em::DeviceRegisterResponse* register_response = |
| 128 register_blob_.mutable_register_response(); | 133 register_blob_.mutable_register_response(); |
| 129 register_response->set_device_management_token("dmtoken123"); | 134 register_response->set_device_management_token("dmtoken123"); |
| 130 | 135 |
| 131 em::CloudPolicySettings policy_proto; | 136 em::CloudPolicySettings policy_proto; |
| 132 policy_proto.mutable_homepagelocation()->set_value("http://chromium.org"); | 137 policy_proto.mutable_homepagelocation()->set_value("http://chromium.org"); |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); | 587 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); |
| 583 EXPECT_TRUE(manager_->core()->client()->is_registered()); | 588 EXPECT_TRUE(manager_->core()->client()->is_registered()); |
| 584 | 589 |
| 585 // The refresh scheduler takes care of the initial fetch for unmanaged users. | 590 // The refresh scheduler takes care of the initial fetch for unmanaged users. |
| 586 // Running the task runner issues the initial fetch. | 591 // Running the task runner issues the initial fetch. |
| 587 FetchPolicy( | 592 FetchPolicy( |
| 588 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_)); | 593 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_)); |
| 589 } | 594 } |
| 590 | 595 |
| 591 } // namespace policy | 596 } // namespace policy |
| OLD | NEW |