| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 ->policy_service(); | 268 ->policy_service(); |
| 269 ASSERT_TRUE(policy_service); | 269 ASSERT_TRUE(policy_service); |
| 270 policy_service->AddObserver(POLICY_DOMAIN_CHROME, &observer); | 270 policy_service->AddObserver(POLICY_DOMAIN_CHROME, &observer); |
| 271 closure.Run(); | 271 closure.Run(); |
| 272 run_loop.Run(); | 272 run_loop.Run(); |
| 273 policy_service->RemoveObserver(POLICY_DOMAIN_CHROME, &observer); | 273 policy_service->RemoveObserver(POLICY_DOMAIN_CHROME, &observer); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void PowerPolicyBrowserTestBase::ReloadUserPolicy(Profile* profile) { | 276 void PowerPolicyBrowserTestBase::ReloadUserPolicy(Profile* profile) { |
| 277 UserCloudPolicyManagerChromeOS* policy_manager = | 277 UserCloudPolicyManagerChromeOS* policy_manager = |
| 278 UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile); | 278 UserCloudPolicyManagerFactoryChromeOS::GetCloudPolicyManagerForProfile( |
| 279 profile); |
| 279 ASSERT_TRUE(policy_manager); | 280 ASSERT_TRUE(policy_manager); |
| 280 policy_manager->core()->store()->Load(); | 281 policy_manager->core()->store()->Load(); |
| 281 } | 282 } |
| 282 | 283 |
| 283 PowerPolicyLoginScreenBrowserTest::PowerPolicyLoginScreenBrowserTest() { | 284 PowerPolicyLoginScreenBrowserTest::PowerPolicyLoginScreenBrowserTest() { |
| 284 } | 285 } |
| 285 | 286 |
| 286 void PowerPolicyLoginScreenBrowserTest::SetUpCommandLine( | 287 void PowerPolicyLoginScreenBrowserTest::SetUpCommandLine( |
| 287 base::CommandLine* command_line) { | 288 base::CommandLine* command_line) { |
| 288 PowerPolicyBrowserTestBase::SetUpCommandLine(command_line); | 289 PowerPolicyBrowserTestBase::SetUpCommandLine(command_line); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 policy = baseline_policy; | 514 policy = baseline_policy; |
| 514 policy.set_ac_idle_action(power_manager_client_->policy().ac_idle_action()); | 515 policy.set_ac_idle_action(power_manager_client_->policy().ac_idle_action()); |
| 515 policy.set_battery_idle_action( | 516 policy.set_battery_idle_action( |
| 516 power_manager_client_->policy().battery_idle_action()); | 517 power_manager_client_->policy().battery_idle_action()); |
| 517 policy.set_reason(power_manager_client_->policy().reason()); | 518 policy.set_reason(power_manager_client_->policy().reason()); |
| 518 EXPECT_EQ(GetDebugString(policy), | 519 EXPECT_EQ(GetDebugString(policy), |
| 519 GetDebugString(power_manager_client_->policy())); | 520 GetDebugString(power_manager_client_->policy())); |
| 520 } | 521 } |
| 521 | 522 |
| 522 } // namespace policy | 523 } // namespace policy |
| OLD | NEW |