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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 10832035: Switch from SignedSettings to DeviceSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More test fixing... Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 5cd699d7066a1be1e9e7426782908e8439e269dc..9cf566d46e115acaef62fd8bfdc7341c29797ad0 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -344,8 +344,8 @@ void ExistingUserController::CompleteLoginInternal(std::string username,
}
// If the device is not owned yet, successfully logged in user will be owner.
- is_owner_login_ = OwnershipService::GetSharedInstance()->GetStatus(true) ==
- OwnershipService::OWNERSHIP_NONE;
+ is_owner_login_ = DeviceSettingsService::Get()->GetOwnershipStatus(true) ==
+ DeviceSettingsService::OWNERSHIP_NONE;
is_login_in_progress_ = true;
login_performer_->CompleteLogin(username, password);
@@ -361,8 +361,8 @@ void ExistingUserController::Login(const std::string& username,
login_display_->SetUIEnabled(false);
// If the device is not owned yet, successfully logged in user will be owner.
- is_owner_login_ = OwnershipService::GetSharedInstance()->GetStatus(true) ==
- OwnershipService::OWNERSHIP_NONE;
+ is_owner_login_ = DeviceSettingsService::Get()->GetOwnershipStatus(true) ==
+ DeviceSettingsService::OWNERSHIP_NONE;
BootTimesLoader::Get()->RecordLoginAttempted();
@@ -463,18 +463,18 @@ void ExistingUserController::OnUserSelected(const std::string& username) {
void ExistingUserController::OnStartEnterpriseEnrollment() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kEnableDevicePolicy)) {
- OwnershipService::GetSharedInstance()->GetStatusAsync(
+ DeviceSettingsService::Get()->GetOwnershipStatusAsync(
base::Bind(&ExistingUserController::OnEnrollmentOwnershipCheckCompleted,
weak_factory_.GetWeakPtr()));
}
}
void ExistingUserController::OnEnrollmentOwnershipCheckCompleted(
- OwnershipService::Status status,
+ DeviceSettingsService::OwnershipStatus status,
bool current_user_is_owner) {
- if (status == OwnershipService::OWNERSHIP_NONE) {
+ if (status == DeviceSettingsService::OWNERSHIP_NONE) {
ShowEnrollmentScreen(false, std::string());
- } else if (status == OwnershipService::OWNERSHIP_TAKEN) {
+ } else if (status == DeviceSettingsService::OWNERSHIP_TAKEN) {
// On a device that is already owned we might want to allow users to
// re-enroll if the policy information is invalid.
CrosSettingsProvider::TrustedStatus trusted_status =

Powered by Google App Engine
This is Rietveld 408576698