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

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

Issue 14069017: Move *UserLoggedIn methods from UserManager to UserManagerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit addressed. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/existing_user_controller_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 839b5c1db9a53512c703a3a26cdfde6ad22fa981..e54bf0eaaa48fd592750f6eb2c2640909f6b643f 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -782,9 +782,12 @@ void ExistingUserController::OnProfilePrepared(Profile* profile) {
host_ = NULL;
} else {
#endif
- ActivateWizard(WizardController::IsDeviceRegistered() ?
- WizardController::kTermsOfServiceScreenName :
- WizardController::kRegistrationScreenName);
+ // Mark the device as registered., i.e. the second part of OOBE as
+ // completed.
+ if (!WizardController::IsDeviceRegistered())
+ WizardController::MarkDeviceRegistered();
+
+ ActivateWizard(WizardController::kTermsOfServiceScreenName);
#ifndef NDEBUG
}
#endif
@@ -805,17 +808,12 @@ void ExistingUserController::OnProfilePrepared(Profile* profile) {
void ExistingUserController::OnOffTheRecordLoginSuccess() {
is_login_in_progress_ = false;
offline_failed_ = false;
- if (WizardController::IsDeviceRegistered()) {
- LoginUtils::Get()->CompleteOffTheRecordLogin(guest_mode_url_);
- } else {
- // Postpone CompleteOffTheRecordLogin until registration completion.
- // TODO(nkostylev): Kind of hack. We have to instruct UserManager here
- // that we're actually logged in as Guest user as we'll ask UserManager
- // later in the code path whether we've signed in as Guest and depending
- // on that would either show image screen or call CompleteOffTheRecordLogin.
- UserManager::Get()->GuestUserLoggedIn();
- ActivateWizard(WizardController::kRegistrationScreenName);
- }
+
+ // Mark the device as registered., i.e. the second part of OOBE as completed.
+ if (!WizardController::IsDeviceRegistered())
+ WizardController::MarkDeviceRegistered();
+
+ LoginUtils::Get()->CompleteOffTheRecordLogin(guest_mode_url_);
if (login_status_consumer_)
login_status_consumer_->OnOffTheRecordLoginSuccess();
@@ -896,12 +894,7 @@ void ExistingUserController::OnOnlineChecked(const std::string& username,
// ExistingUserController, private:
void ExistingUserController::ActivateWizard(const std::string& screen_name) {
- DictionaryValue* params = NULL;
- if (chromeos::UserManager::Get()->IsLoggedInAsGuest()) {
- params = new DictionaryValue;
- params->SetString("start_url", guest_mode_url_.spec());
- }
- host_->StartWizard(screen_name, params);
+ host_->StartWizard(screen_name, NULL);
}
void ExistingUserController::ConfigurePublicSessionAutoLogin() {
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/existing_user_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698