| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 void ExistingUserController::OnStartEnterpriseEnrollment() { | 244 void ExistingUserController::OnStartEnterpriseEnrollment() { |
| 245 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 245 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 246 if (command_line->HasSwitch(switches::kEnableDevicePolicy)) { | 246 if (command_line->HasSwitch(switches::kEnableDevicePolicy)) { |
| 247 ownership_checker_.reset(new OwnershipStatusChecker(NewCallback( | 247 ownership_checker_.reset(new OwnershipStatusChecker(NewCallback( |
| 248 this, &ExistingUserController::OnEnrollmentOwnershipCheckCompleted))); | 248 this, &ExistingUserController::OnEnrollmentOwnershipCheckCompleted))); |
| 249 } | 249 } |
| 250 } | 250 } |
| 251 | 251 |
| 252 void ExistingUserController::OnEnrollmentOwnershipCheckCompleted( | 252 void ExistingUserController::OnEnrollmentOwnershipCheckCompleted( |
| 253 OwnershipService::Status status, | 253 OwnershipService::Status status) { |
| 254 bool current_user_is_owner) { | |
| 255 if (status == OwnershipService::OWNERSHIP_NONE) { | 254 if (status == OwnershipService::OWNERSHIP_NONE) { |
| 256 host_->StartWizard(WizardController::kEnterpriseEnrollmentScreenName, | 255 host_->StartWizard(WizardController::kEnterpriseEnrollmentScreenName, |
| 257 GURL()); | 256 GURL()); |
| 258 login_display_->OnFadeOut(); | 257 login_display_->OnFadeOut(); |
| 259 } | 258 } |
| 260 ownership_checker_.reset(); | 259 ownership_checker_.reset(); |
| 261 } | 260 } |
| 262 | 261 |
| 263 //////////////////////////////////////////////////////////////////////////////// | 262 //////////////////////////////////////////////////////////////////////////////// |
| 264 // ExistingUserController, LoginPerformer::Delegate implementation: | 263 // ExistingUserController, LoginPerformer::Delegate implementation: |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 } | 560 } |
| 562 if (CrosLibrary::Get()->EnsureLoaded()) { | 561 if (CrosLibrary::Get()->EnsureLoaded()) { |
| 563 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary(); | 562 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary(); |
| 564 cryptohomed->AsyncSetOwnerUser( | 563 cryptohomed->AsyncSetOwnerUser( |
| 565 UserCrosSettingsProvider::cached_owner(), NULL); | 564 UserCrosSettingsProvider::cached_owner(), NULL); |
| 566 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL); | 565 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL); |
| 567 } | 566 } |
| 568 } | 567 } |
| 569 | 568 |
| 570 } // namespace chromeos | 569 } // namespace chromeos |
| OLD | NEW |