| 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 "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" | 5 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 DevicePolicyCrosBrowserTest::DevicePolicyCrosBrowserTest() | 80 DevicePolicyCrosBrowserTest::DevicePolicyCrosBrowserTest() |
| 81 : fake_session_manager_client_(new chromeos::FakeSessionManagerClient) { | 81 : fake_session_manager_client_(new chromeos::FakeSessionManagerClient) { |
| 82 } | 82 } |
| 83 | 83 |
| 84 DevicePolicyCrosBrowserTest::~DevicePolicyCrosBrowserTest() { | 84 DevicePolicyCrosBrowserTest::~DevicePolicyCrosBrowserTest() { |
| 85 } | 85 } |
| 86 | 86 |
| 87 void DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture() { | 87 void DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture() { |
| 88 dbus_setter_ = chromeos::DBusThreadManager::GetSetterForTesting(); | 88 dbus_setter_ = chromeos::DBusThreadManager::GetSetterForTesting(); |
| 89 dbus_setter_->SetSessionManagerClient( | 89 dbus_setter_->SetSessionManagerClient( |
| 90 scoped_ptr<chromeos::SessionManagerClient>(fake_session_manager_client_)); | 90 std::unique_ptr<chromeos::SessionManagerClient>( |
| 91 fake_session_manager_client_)); |
| 91 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); | 92 InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 92 } | 93 } |
| 93 | 94 |
| 94 void DevicePolicyCrosBrowserTest::TearDownInProcessBrowserTestFixture() { | 95 void DevicePolicyCrosBrowserTest::TearDownInProcessBrowserTestFixture() { |
| 95 InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); | 96 InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); |
| 96 } | 97 } |
| 97 | 98 |
| 98 void DevicePolicyCrosBrowserTest::MarkAsEnterpriseOwned() { | 99 void DevicePolicyCrosBrowserTest::MarkAsEnterpriseOwned() { |
| 99 test_helper_.MarkAsEnterpriseOwned(); | 100 test_helper_.MarkAsEnterpriseOwned(); |
| 100 } | 101 } |
| 101 | 102 |
| 102 void DevicePolicyCrosBrowserTest::InstallOwnerKey() { | 103 void DevicePolicyCrosBrowserTest::InstallOwnerKey() { |
| 103 test_helper_.InstallOwnerKey(); | 104 test_helper_.InstallOwnerKey(); |
| 104 } | 105 } |
| 105 | 106 |
| 106 void DevicePolicyCrosBrowserTest::RefreshDevicePolicy() { | 107 void DevicePolicyCrosBrowserTest::RefreshDevicePolicy() { |
| 107 // Reset the key to its original state. | 108 // Reset the key to its original state. |
| 108 device_policy()->SetDefaultSigningKey(); | 109 device_policy()->SetDefaultSigningKey(); |
| 109 device_policy()->Build(); | 110 device_policy()->Build(); |
| 110 session_manager_client()->set_device_policy(device_policy()->GetBlob()); | 111 session_manager_client()->set_device_policy(device_policy()->GetBlob()); |
| 111 session_manager_client()->OnPropertyChangeComplete(true); | 112 session_manager_client()->OnPropertyChangeComplete(true); |
| 112 } | 113 } |
| 113 | 114 |
| 114 } // namespace policy | 115 } // namespace policy |
| OLD | NEW |