#include "base/callback.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
-#include "base/file_util.h"
#include "base/files/file_path.h"
+#include "base/files/file_util.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/boot_times_loader.h"
-#include "chrome/browser/chromeos/login/auth/parallel_authenticator.h"
+#include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h"
#include "chrome/browser/chromeos/login/chrome_restart_request.h"
#include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h"
+#if defined(USE_ATHENA)
+#include "athena/extensions/public/extensions_delegate.h"
+#include "athena/main/public/athena_launcher.h"
+#endif
+
using content::BrowserThread;
namespace {
if (controller->auth_mode() != LoginPerformer::AUTH_MODE_INTERNAL)
return false;
+ // No early restart if Easy unlock key needs to be updated.
+ if (UserSessionManager::GetInstance()->NeedsToUpdateEasyUnlockKeys())
+ return false;
+
return true;
}
VLOG(1) << "Launching browser...";
TRACE_EVENT0("login", "LaunchBrowser");
+
+#if defined(USE_ATHENA)
+ athena::ExtensionsDelegate::CreateExtensionsDelegateForChrome(profile);
+ athena::StartAthenaSessionWithContext(profile);
+#else
StartupBrowserCreator browser_creator;
int return_code;
chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
// Triggers app launcher start page service to load start page web contents.
app_list::StartPageService::Get(profile);
+#endif
// Mark login host for deletion after browser starts. This
// guarantees that the message loop will be referenced by the
}
if (authenticator_.get() == NULL) {
- authenticator_ = new ParallelAuthenticator(consumer);
+ authenticator_ = new ChromeCryptohomeAuthenticator(consumer);
} else {
// TODO(nkostylev): Fix this hack by improving Authenticator dependencies.
authenticator_->SetConsumer(consumer);
#endif
void LoginUtilsImpl::AttemptRestart(Profile* profile) {
+ if (UserSessionManager::GetInstance()
+ ->CheckEasyUnlockKeyOps(
+ base::Bind(&LoginUtilsImpl::AttemptRestart,
+ base::Unretained(this),
+ profile))) {
+ return;
+ }
+
if (UserSessionManager::GetInstance()->GetSigninSessionRestoreStrategy() !=
OAuth2LoginManager::RESTORE_FROM_COOKIE_JAR) {
chrome::AttemptRestart();