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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 bool pending_requests, | 337 bool pending_requests, |
338 bool using_oauth) { | 338 bool using_oauth) { |
339 bool known_user = UserManager::Get()->IsKnownUser(username); | 339 bool known_user = UserManager::Get()->IsKnownUser(username); |
340 bool login_only = | 340 bool login_only = |
341 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 341 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
342 switches::kLoginScreen) == WizardController::kLoginScreenName; | 342 switches::kLoginScreen) == WizardController::kLoginScreenName; |
343 ready_for_browser_launch_ = known_user || login_only; | 343 ready_for_browser_launch_ = known_user || login_only; |
344 | 344 |
345 two_factor_credentials_ = credentials.two_factor; | 345 two_factor_credentials_ = credentials.two_factor; |
346 | 346 |
| 347 bool has_cookies = |
| 348 login_performer_->auth_mode() == LoginPerformer::AUTH_MODE_EXTENSION; |
| 349 |
347 // LoginPerformer instance will delete itself once online auth result is OK. | 350 // LoginPerformer instance will delete itself once online auth result is OK. |
348 // In case of failure it'll bring up ScreenLock and ask for | 351 // In case of failure it'll bring up ScreenLock and ask for |
349 // correct password/display error message. | 352 // correct password/display error message. |
350 // Even in case when following online,offline protocol and returning | 353 // Even in case when following online,offline protocol and returning |
351 // requests_pending = false, let LoginPerformer delete itself. | 354 // requests_pending = false, let LoginPerformer delete itself. |
352 login_performer_->set_delegate(NULL); | 355 login_performer_->set_delegate(NULL); |
353 LoginPerformer* performer = login_performer_.release(); | 356 LoginPerformer* performer = login_performer_.release(); |
354 performer = NULL; | 357 performer = NULL; |
355 | 358 |
356 // Will call OnProfilePrepared() in the end. | 359 // Will call OnProfilePrepared() in the end. |
357 LoginUtils::Get()->PrepareProfile(username, | 360 LoginUtils::Get()->PrepareProfile(username, |
358 password, | 361 password, |
359 credentials, | 362 credentials, |
360 pending_requests, | 363 pending_requests, |
361 using_oauth, | 364 using_oauth, |
| 365 has_cookies, |
362 this); | 366 this); |
363 | 367 |
364 | 368 |
365 if (login_status_consumer_) | 369 if (login_status_consumer_) |
366 login_status_consumer_->OnLoginSuccess(username, password, | 370 login_status_consumer_->OnLoginSuccess(username, password, |
367 credentials, pending_requests, | 371 credentials, pending_requests, |
368 using_oauth); | 372 using_oauth); |
369 | 373 |
370 // Notifiy LoginDisplay to allow it provide visual feedback to user. | 374 // Notifiy LoginDisplay to allow it provide visual feedback to user. |
371 login_display_->OnLoginSuccess(username); | 375 login_display_->OnLoginSuccess(username); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 } | 560 } |
557 if (CrosLibrary::Get()->EnsureLoaded()) { | 561 if (CrosLibrary::Get()->EnsureLoaded()) { |
558 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary(); | 562 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary(); |
559 cryptohomed->AsyncSetOwnerUser( | 563 cryptohomed->AsyncSetOwnerUser( |
560 UserCrosSettingsProvider::cached_owner(), NULL); | 564 UserCrosSettingsProvider::cached_owner(), NULL); |
561 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL); | 565 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL); |
562 } | 566 } |
563 } | 567 } |
564 | 568 |
565 } // namespace chromeos | 569 } // namespace chromeos |
OLD | NEW |