Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.cc

Issue 565293003: Revert of Non-plafrom-specific part of an OwnerSettingsService is moved to components/ownership/*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_chromeos.h" 8 #include "chrome/browser/chromeos/ownership/owner_settings_service.h"
9 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact ory.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"
11 #include "chromeos/login/login_state.h" 11 #include "chromeos/login/login_state.h"
12 #include "components/ownership/owner_key_util.h"
13 #include "components/user_manager/user_manager.h" 12 #include "components/user_manager/user_manager.h"
14 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
15 14
16 using content::BrowserThread; 15 using content::BrowserThread;
17 16
18 namespace chromeos { 17 namespace chromeos {
19 18
20 ChromeCryptohomeAuthenticator::ChromeCryptohomeAuthenticator( 19 ChromeCryptohomeAuthenticator::ChromeCryptohomeAuthenticator(
21 AuthStatusConsumer* consumer) 20 AuthStatusConsumer* consumer)
22 : CryptohomeAuthenticator(base::ThreadTaskRunnerHandle::Get(), consumer) { 21 : CryptohomeAuthenticator(base::ThreadTaskRunnerHandle::Get(), consumer) {
(...skipping 15 matching lines...) Expand all
38 void ChromeCryptohomeAuthenticator::CheckSafeModeOwnership( 37 void ChromeCryptohomeAuthenticator::CheckSafeModeOwnership(
39 const UserContext& context, 38 const UserContext& context,
40 const IsOwnerCallback& callback) { 39 const IsOwnerCallback& callback) {
41 // |IsOwnerForSafeModeAsync| expects logged in state to be 40 // |IsOwnerForSafeModeAsync| expects logged in state to be
42 // LOGGED_IN_SAFE_MODE. 41 // LOGGED_IN_SAFE_MODE.
43 if (LoginState::IsInitialized()) { 42 if (LoginState::IsInitialized()) {
44 LoginState::Get()->SetLoggedInState(LoginState::LOGGED_IN_SAFE_MODE, 43 LoginState::Get()->SetLoggedInState(LoginState::LOGGED_IN_SAFE_MODE,
45 LoginState::LOGGED_IN_USER_NONE); 44 LoginState::LOGGED_IN_USER_NONE);
46 } 45 }
47 46
48 OwnerSettingsServiceChromeOS::IsOwnerForSafeModeAsync( 47 OwnerSettingsService::IsOwnerForSafeModeAsync(
49 context.GetUserIDHash(), 48 context.GetUserIDHash(),
50 OwnerSettingsServiceChromeOSFactory::GetInstance()->GetOwnerKeyUtil(), 49 OwnerSettingsServiceFactory::GetInstance()->GetOwnerKeyUtil(),
51 callback); 50 callback);
52 } 51 }
53 52
54 } // namespace chromeos 53 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698