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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 14179007: Move cryptohome_library to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/chromeos/chromeos_version.h" 10 #include "base/chromeos/chromeos_version.h"
(...skipping 13 matching lines...) Expand all
24 #include "base/synchronization/lock.h" 24 #include "base/synchronization/lock.h"
25 #include "base/task_runner_util.h" 25 #include "base/task_runner_util.h"
26 #include "base/threading/worker_pool.h" 26 #include "base/threading/worker_pool.h"
27 #include "base/time.h" 27 #include "base/time.h"
28 #include "base/utf_string_conversions.h" 28 #include "base/utf_string_conversions.h"
29 #include "chrome/browser/about_flags.h" 29 #include "chrome/browser/about_flags.h"
30 #include "chrome/browser/app_mode/app_mode_utils.h" 30 #include "chrome/browser/app_mode/app_mode_utils.h"
31 #include "chrome/browser/browser_process.h" 31 #include "chrome/browser/browser_process.h"
32 #include "chrome/browser/browser_shutdown.h" 32 #include "chrome/browser/browser_shutdown.h"
33 #include "chrome/browser/chromeos/boot_times_loader.h" 33 #include "chrome/browser/chromeos/boot_times_loader.h"
34 #include "chrome/browser/chromeos/cros/cros_library.h"
35 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
36 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" 34 #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
37 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 35 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
38 #include "chrome/browser/chromeos/input_method/input_method_util.h" 36 #include "chrome/browser/chromeos/input_method/input_method_util.h"
39 #include "chrome/browser/chromeos/login/chrome_restart_request.h" 37 #include "chrome/browser/chromeos/login/chrome_restart_request.h"
40 #include "chrome/browser/chromeos/login/language_switch_menu.h" 38 #include "chrome/browser/chromeos/login/language_switch_menu.h"
41 #include "chrome/browser/chromeos/login/login_display_host.h" 39 #include "chrome/browser/chromeos/login/login_display_host.h"
42 #include "chrome/browser/chromeos/login/oauth_login_manager.h" 40 #include "chrome/browser/chromeos/login/oauth_login_manager.h"
43 #include "chrome/browser/chromeos/login/parallel_authenticator.h" 41 #include "chrome/browser/chromeos/login/parallel_authenticator.h"
44 #include "chrome/browser/chromeos/login/profile_auth_data.h" 42 #include "chrome/browser/chromeos/login/profile_auth_data.h"
45 #include "chrome/browser/chromeos/login/screen_locker.h" 43 #include "chrome/browser/chromeos/login/screen_locker.h"
(...skipping 21 matching lines...) Expand all
67 #include "chrome/browser/signin/token_service.h" 65 #include "chrome/browser/signin/token_service.h"
68 #include "chrome/browser/signin/token_service_factory.h" 66 #include "chrome/browser/signin/token_service_factory.h"
69 #include "chrome/browser/sync/profile_sync_service.h" 67 #include "chrome/browser/sync/profile_sync_service.h"
70 #include "chrome/browser/sync/profile_sync_service_factory.h" 68 #include "chrome/browser/sync/profile_sync_service_factory.h"
71 #include "chrome/browser/ui/startup/startup_browser_creator.h" 69 #include "chrome/browser/ui/startup/startup_browser_creator.h"
72 #include "chrome/common/chrome_notification_types.h" 70 #include "chrome/common/chrome_notification_types.h"
73 #include "chrome/common/chrome_paths.h" 71 #include "chrome/common/chrome_paths.h"
74 #include "chrome/common/chrome_switches.h" 72 #include "chrome/common/chrome_switches.h"
75 #include "chrome/common/logging_chrome.h" 73 #include "chrome/common/logging_chrome.h"
76 #include "chrome/common/pref_names.h" 74 #include "chrome/common/pref_names.h"
75 #include "chromeos/cryptohome/cryptohome_library.h"
77 #include "chromeos/dbus/dbus_thread_manager.h" 76 #include "chromeos/dbus/dbus_thread_manager.h"
78 #include "chromeos/dbus/session_manager_client.h" 77 #include "chromeos/dbus/session_manager_client.h"
79 #include "content/public/browser/browser_thread.h" 78 #include "content/public/browser/browser_thread.h"
80 #include "content/public/browser/notification_observer.h" 79 #include "content/public/browser/notification_observer.h"
81 #include "content/public/browser/notification_service.h" 80 #include "content/public/browser/notification_service.h"
82 #include "google_apis/gaia/gaia_auth_consumer.h" 81 #include "google_apis/gaia/gaia_auth_consumer.h"
83 #include "google_apis/gaia/gaia_constants.h" 82 #include "google_apis/gaia/gaia_constants.h"
84 #include "google_apis/gaia/gaia_urls.h" 83 #include "google_apis/gaia/gaia_urls.h"
85 #include "googleurl/src/gurl.h" 84 #include "googleurl/src/gurl.h"
86 #include "net/base/network_change_notifier.h" 85 #include "net/base/network_change_notifier.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 NULL, 570 NULL,
572 session_restore_strategy_, 571 session_restore_strategy_,
573 oauth2_refresh_token_, 572 oauth2_refresh_token_,
574 user_context_.auth_code); 573 user_context_.auth_code);
575 } 574 }
576 575
577 void LoginUtilsImpl::FinalizePrepareProfile(Profile* user_profile) { 576 void LoginUtilsImpl::FinalizePrepareProfile(Profile* user_profile) {
578 BootTimesLoader* btl = BootTimesLoader::Get(); 577 BootTimesLoader* btl = BootTimesLoader::Get();
579 // Own TPM device if, for any reason, it has not been done in EULA 578 // Own TPM device if, for any reason, it has not been done in EULA
580 // wizard screen. 579 // wizard screen.
581 CryptohomeLibrary* cryptohome = CrosLibrary::Get()->GetCryptohomeLibrary(); 580 CryptohomeLibrary* cryptohome = CryptohomeLibrary::Get();
582 btl->AddLoginTimeMarker("TPMOwn-Start", false); 581 btl->AddLoginTimeMarker("TPMOwn-Start", false);
583 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) { 582 if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) {
584 if (cryptohome->TpmIsOwned()) { 583 if (cryptohome->TpmIsOwned()) {
585 cryptohome->TpmClearStoredPassword(); 584 cryptohome->TpmClearStoredPassword();
586 } else { 585 } else {
587 cryptohome->TpmCanAttemptOwnership(); 586 cryptohome->TpmCanAttemptOwnership();
588 } 587 }
589 } 588 }
590 btl->AddLoginTimeMarker("TPMOwn-End", false); 589 btl->AddLoginTimeMarker("TPMOwn-End", false);
591 590
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 bool LoginUtils::IsWhitelisted(const std::string& username) { 960 bool LoginUtils::IsWhitelisted(const std::string& username) {
962 CrosSettings* cros_settings = CrosSettings::Get(); 961 CrosSettings* cros_settings = CrosSettings::Get();
963 bool allow_new_user = false; 962 bool allow_new_user = false;
964 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 963 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
965 if (allow_new_user) 964 if (allow_new_user)
966 return true; 965 return true;
967 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); 966 return cros_settings->FindEmailInList(kAccountsPrefUsers, username);
968 } 967 }
969 968
970 } // namespace chromeos 969 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698