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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_FLOW_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_FLOW_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/strings/string16.h"
11 #include "chrome/browser/chromeos/login/user_flow.h"
17 // UserFlow implementation for creating new locally managed user.
18 class LocallyManagedUserCreationFlow
: public ExtendedUserFlow
{
20 explicit LocallyManagedUserCreationFlow(const std::string
& manager_id
);
21 virtual ~LocallyManagedUserCreationFlow();
23 virtual bool ShouldShowSettings() OVERRIDE
;
24 virtual bool ShouldLaunchBrowser() OVERRIDE
;
25 virtual bool ShouldSkipPostLoginScreens() OVERRIDE
;
26 virtual bool HandleLoginFailure(const LoginFailure
& failure
) OVERRIDE
;
27 virtual bool HandlePasswordChangeDetected() OVERRIDE
;
28 virtual void HandleOAuthTokenStatusChange(User::OAuthTokenStatus status
)
30 virtual void LaunchExtraSteps(Profile
* profile
) OVERRIDE
;
32 // Display name for user being created.
34 // Password for user being created.
35 std::string password_
;
37 // Indicates if manager OAuth2 token has been validated.
38 bool token_validated_
;
40 // Indicates if manager was successfully authenticated against
44 Profile
* manager_profile_
;
46 DISALLOW_COPY_AND_ASSIGN(LocallyManagedUserCreationFlow
);
49 } // namespace chromeos
51 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MANAGED_LOCALLY_MANAGED_USER_CREATION_FLOW_H_