OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/login/auth/chrome_cryptohome_authenticator.h" | 5 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" |
6 | 6 |
7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "chrome/browser/chromeos/ownership/owner_settings_service.h" | 8 #include "chrome/browser/chromeos/ownership/owner_settings_service.h" |
9 #include "chrome/browser/chromeos/ownership/owner_settings_service_factory.h" | 9 #include "chrome/browser/chromeos/ownership/owner_settings_service_factory.h" |
10 #include "chrome/browser/chromeos/settings/cros_settings.h" | 10 #include "chrome/browser/chromeos/settings/cros_settings.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 const UserContext& context, | 37 const UserContext& context, |
38 const IsOwnerCallback& callback) { | 38 const IsOwnerCallback& callback) { |
39 // |IsOwnerForSafeModeAsync| expects logged in state to be | 39 // |IsOwnerForSafeModeAsync| expects logged in state to be |
40 // LOGGED_IN_SAFE_MODE. | 40 // LOGGED_IN_SAFE_MODE. |
41 if (LoginState::IsInitialized()) { | 41 if (LoginState::IsInitialized()) { |
42 LoginState::Get()->SetLoggedInState(LoginState::LOGGED_IN_SAFE_MODE, | 42 LoginState::Get()->SetLoggedInState(LoginState::LOGGED_IN_SAFE_MODE, |
43 LoginState::LOGGED_IN_USER_NONE); | 43 LoginState::LOGGED_IN_USER_NONE); |
44 } | 44 } |
45 | 45 |
46 OwnerSettingsService::IsOwnerForSafeModeAsync( | 46 OwnerSettingsService::IsOwnerForSafeModeAsync( |
47 context.GetUserID(), | |
48 context.GetUserIDHash(), | 47 context.GetUserIDHash(), |
49 OwnerSettingsServiceFactory::GetInstance()->GetOwnerKeyUtil(), | 48 OwnerSettingsServiceFactory::GetInstance()->GetOwnerKeyUtil(), |
50 callback); | 49 callback); |
51 } | 50 } |
52 | 51 |
53 } // namespace chromeos | 52 } // namespace chromeos |
OLD | NEW |