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/settings/device_settings_test_helper.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
10 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 10 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 if (!user) { | 249 if (!user) { |
250 user = user_manager_->AddUser(user_id); | 250 user = user_manager_->AddUser(user_id); |
251 profile_->set_profile_name(user_id); | 251 profile_->set_profile_name(user_id); |
252 | 252 |
253 ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, | 253 ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, |
254 profile_.get()); | 254 profile_.get()); |
255 ProfileHelper::Get()->SetProfileToUserMappingForTesting( | 255 ProfileHelper::Get()->SetProfileToUserMappingForTesting( |
256 const_cast<user_manager::User*>(user)); | 256 const_cast<user_manager::User*>(user)); |
257 } | 257 } |
258 OwnerSettingsServiceChromeOS* service = | 258 OwnerSettingsServiceChromeOS* service = |
259 OwnerSettingsServiceChromeOSFactory::GetForBrowserContext(profile_.get()); | 259 OwnerSettingsServiceChromeOSFactory::GetForProfile(profile_.get()); |
260 CHECK(service); | 260 CHECK(service); |
261 if (tpm_is_ready) | 261 if (tpm_is_ready) |
262 service->OnTPMTokenReady(true /* token is enabled */); | 262 service->OnTPMTokenReady(true /* token is enabled */); |
263 } | 263 } |
264 | 264 |
265 } // namespace chromeos | 265 } // namespace chromeos |
OLD | NEW |