Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / managed / locally_managed_user_creation_flow.h
blob99586200a683d9be62df61d944d53ceba5661f0a
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"
13 class Profile;
15 namespace chromeos {
17 // UserFlow implementation for creating new locally managed user.
18 class LocallyManagedUserCreationFlow : public ExtendedUserFlow {
19 public:
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)
29 OVERRIDE;
30 virtual void LaunchExtraSteps(Profile* profile) OVERRIDE;
31 private:
32 // Display name for user being created.
33 base::string16 name_;
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
41 // local cryptohome.
42 bool logged_in_;
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_