Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: chrome/browser/chromeos/login/auth/chrome_login_performer.h

Issue 681593003: Revert of Extract LoginPerformer to chromeos/auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_CHROME_LOGIN_PERFORMER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_CHROME_LOGIN_PERFORMER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/chromeos/policy/wildcard_login_checker.h"
14 #include "chromeos/login/auth/auth_status_consumer.h"
15 #include "chromeos/login/auth/authenticator.h"
16 #include "chromeos/login/auth/extended_authenticator.h"
17 #include "chromeos/login/auth/login_performer.h"
18 #include "chromeos/login/auth/online_attempt_host.h"
19 #include "chromeos/login/auth/user_context.h"
20 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h"
22 #include "google_apis/gaia/google_service_auth_error.h"
23
24 namespace policy {
25 class WildcardLoginChecker;
26 }
27
28 namespace chromeos {
29
30 // This class implements chrome-specific elements of Login Performer.
31
32 class ChromeLoginPerformer : public LoginPerformer {
33 public:
34 explicit ChromeLoginPerformer(Delegate* delegate);
35 virtual ~ChromeLoginPerformer();
36
37 protected:
38 virtual bool RunTrustedCheck(const base::Closure& callback) override;
39 void DidRunTrustedCheck(const base::Closure& callback);
40 virtual bool IsUserWhitelisted(const std::string& user_id,
41 bool* wildcard_match) override;
42
43 virtual void RunOnlineWhitelistCheck(
44 const std::string& user_id,
45 bool wildcard_match,
46 const base::Closure& success_callback,
47 const base::Closure& failure_callback) override;
48 virtual bool AreSupervisedUsersAllowed() override;
49
50 virtual bool UseExtendedAuthenticatorForSupervisedUser(
51 const UserContext& user_context) override;
52
53 virtual UserContext TransformSupervisedKey(
54 const UserContext& context) override;
55
56 virtual void SetupSupervisedUserFlow(const std::string& user_id) override;
57
58 virtual scoped_refptr<Authenticator> CreateAuthenticator() override;
59 virtual bool CheckPolicyForUser(const std::string& user_id) override;
60 virtual content::BrowserContext* GetSigninContext() override;
61 virtual net::URLRequestContextGetter* GetSigninRequestContext() override;
62
63 private:
64 void OnlineWildcardLoginCheckCompleted(
65 const base::Closure& success_callback,
66 const base::Closure& failure_callback,
67 policy::WildcardLoginChecker::Result result);
68
69 // Used to verify logins that matched wildcard on the login whitelist.
70 scoped_ptr<policy::WildcardLoginChecker> wildcard_login_checker_;
71 base::WeakPtrFactory<ChromeLoginPerformer> weak_factory_;
72
73 DISALLOW_COPY_AND_ASSIGN(ChromeLoginPerformer);
74 };
75
76 } // namespace chromeos
77
78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_CHROME_LOGIN_PERFORMER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc ('k') | chrome/browser/chromeos/login/auth/chrome_login_performer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698