1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 #include "base/message_loop/message_loop.h"
7 #include "chrome/browser/chromeos/login/user_flow.h"
8 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
14 void UnregisterFlow(const std::string
& user_id
) {
15 ChromeUserManager::Get()->ResetUserFlow(user_id
);
21 UserFlow::UserFlow() : host_(NULL
) {}
23 UserFlow::~UserFlow() {}
25 void UserFlow::SetHost(LoginDisplayHost
* host
) {
26 VLOG(1) << "Flow " << this << " got host " << host
;
30 DefaultUserFlow::~DefaultUserFlow() {}
32 void DefaultUserFlow::AppendAdditionalCommandLineSwitches() {
35 bool DefaultUserFlow::CanLockScreen() {
39 bool DefaultUserFlow::ShouldShowSettings() {
43 bool DefaultUserFlow::ShouldLaunchBrowser() {
47 bool DefaultUserFlow::ShouldSkipPostLoginScreens() {
51 bool DefaultUserFlow::SupportsEarlyRestartToApplyFlags() {
55 bool DefaultUserFlow::HandleLoginFailure(const AuthFailure
& failure
) {
59 void DefaultUserFlow::HandleLoginSuccess(const UserContext
& context
) {}
61 bool DefaultUserFlow::HandlePasswordChangeDetected() {
65 void DefaultUserFlow::HandleOAuthTokenStatusChange(
66 user_manager::User::OAuthTokenStatus status
) {
69 void DefaultUserFlow::LaunchExtraSteps(Profile
* profile
) {
72 ExtendedUserFlow::ExtendedUserFlow(const std::string
& user_id
)
76 ExtendedUserFlow::~ExtendedUserFlow() {
79 void ExtendedUserFlow::AppendAdditionalCommandLineSwitches() {
82 bool ExtendedUserFlow::ShouldShowSettings() {
86 void ExtendedUserFlow::HandleOAuthTokenStatusChange(
87 user_manager::User::OAuthTokenStatus status
) {
90 void ExtendedUserFlow::UnregisterFlowSoon() {
91 std::string
id_copy(user_id());
92 base::MessageLoop::current()->PostTask(FROM_HERE
,
93 base::Bind(&UnregisterFlow
,
97 } // namespace chromeos