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

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

Issue 6353007: ExistingUserController is used for login under automation tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed browsertests Created 9 years, 11 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) 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 <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <map> 9 #include <map>
10 10
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 bool pending_requests) { 536 bool pending_requests) {
537 // LoginPerformer instance will delete itself once online auth result is OK. 537 // LoginPerformer instance will delete itself once online auth result is OK.
538 // In case of failure it'll bring up ScreenLock and ask for 538 // In case of failure it'll bring up ScreenLock and ask for
539 // correct password/display error message. 539 // correct password/display error message.
540 // Even in case when following online,offline protocol and returning 540 // Even in case when following online,offline protocol and returning
541 // requests_pending = false, let LoginPerformer delete itself. 541 // requests_pending = false, let LoginPerformer delete itself.
542 login_performer_->set_delegate(NULL); 542 login_performer_->set_delegate(NULL);
543 LoginPerformer* performer = login_performer_.release(); 543 LoginPerformer* performer = login_performer_.release();
544 performer = NULL; 544 performer = NULL;
545 bool known_user = UserManager::Get()->IsKnownUser(username); 545 bool known_user = UserManager::Get()->IsKnownUser(username);
546 bool login_only =
547 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
548 switches::kLoginScreen) == WizardController::kLoginScreenName;
546 AppendStartUrlToCmdline(); 549 AppendStartUrlToCmdline();
547 controllers_[selected_view_index_]->StopThrobber(); 550 controllers_[selected_view_index_]->StopThrobber();
548 if (selected_view_index_ + 1 == controllers_.size() && !known_user) { 551 if (selected_view_index_ + 1 == controllers_.size() &&
552 !known_user && !login_only) {
549 #if defined(OFFICIAL_BUILD) 553 #if defined(OFFICIAL_BUILD)
550 CommandLine::ForCurrentProcess()->AppendSwitchPath( 554 CommandLine::ForCurrentProcess()->AppendSwitchPath(
551 switches::kLoadExtension, 555 switches::kLoadExtension,
552 FilePath(kGetStartedPath)); 556 FilePath(kGetStartedPath));
553 CommandLine::ForCurrentProcess()->AppendArg(kGetStartedURL); 557 CommandLine::ForCurrentProcess()->AppendArg(kGetStartedURL);
554 #endif // OFFICIAL_BUILD 558 #endif // OFFICIAL_BUILD
555 if (credentials.two_factor) { 559 if (credentials.two_factor) {
556 // If we have a two factor error and and this is a new user, 560 // If we have a two factor error and and this is a new user,
557 // load the personal settings page. 561 // load the personal settings page.
558 // TODO(stevenjb): direct the user to a lightweight sync login page. 562 // TODO(stevenjb): direct the user to a lightweight sync login page.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 login_performer_->RecoverEncryptedData(old_password); 656 login_performer_->RecoverEncryptedData(old_password);
653 } 657 }
654 658
655 void ExistingUserController::ResyncEncryptedData() { 659 void ExistingUserController::ResyncEncryptedData() {
656 // LoginPerformer instance has state of the user so it should exist. 660 // LoginPerformer instance has state of the user so it should exist.
657 if (login_performer_.get()) 661 if (login_performer_.get())
658 login_performer_->ResyncEncryptedData(); 662 login_performer_->ResyncEncryptedData();
659 } 663 }
660 664
661 } // namespace chromeos 665 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_chromeos.cc ('k') | chrome/browser/chromeos/login/login_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698